Articles on: Game Hosting

How to Add Country Flag to Garry's Mod Server

On your Garry's Mod server, you can set a country flag, displayed to the left of your GMod server in the browser.

Server browser example
Displayed location flags can represent the country that the server is in. The location flag can also represent the language.
This can be helpful for players from unique countries looking for a server to connect to.


Adding a Country Flag to Your GMod Server



To add a Country Flag to a GMod server:

Log Into Your Garry's Mod Server

Stop your GMod server. You won't get an error if you don't do this, but you have to restart the server at some point to update it.

Open the server.svg file (Search for /garrysmod/cfg/server.cfg) in a text editor.

Add the line sv_location us to the end of the file in a new line (this is for the USA flag, for other flags see below).

Save the cfg file, & restart the garry's mod server.

On startup, you should see the flag in the server browser.


Adding a Unique Country Flag


Other flags
To add other types of country flags to your Garry's mod server, change the line sv_location us to a different ISO code in the server.cfg file. This directly corresponds to the flag icon in materials/flags16. Examples below:
Russian flag: sv_location ru

Great Britain flag: sv_location gb

Lithuania flag: sv_location lt

French flag: sv_location fr

European Union flag (has a special case): sv_location eu


Need a different country flag code?


Check out the full list of ISO flag codes online: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Find the country that you want to add as a flag (Control + F and search the name of the country).

In the table, select and copy the Code in the same row (Make sure you're in the Officially assigned code elements section OR the Exceptional reservations section).

Instead of sv_location us, change us to the code of the country that you copied before and save it to the server.cfg file.


Troubleshooting



Having some issues adding your country flag?

Make sure that you restarted the server.

Make sure you have set the correct country code.

Make sure that you saved the config file.

Still have some questions?


Are you still having trouble with adding your country flag to your Garry's Mod server? Make a ticket at: https://sparkedhost.com/contact, we'll get back to you as soon as possible.

By: Julian T.

Updated on: 20/01/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!