SA-MP Forums Archive
[Tutorial] Changing the map name from "San Andreas" to your own map name. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Changing the map name from "San Andreas" to your own map name. (/showthread.php?tid=168668)



Changing the map name from "San Andreas" to your own map name. - Las Venturas CNR - 17.08.2010

Every now and then people who host servers from their house/ their PC ask me this question,
so for future people, here's how.



Way 1:

Open server.cfg and make a new line, and on that line type "mapname" then space, then your new map name.
Reload your server, and "San Andreas" will be replaced with your new text/ mapname.

Way 2:
Under "OnGameModeInIt" call back, add
pawn Code:
SendRconCommand("mapname My_Server");
and simply replace "My_Server" with your new map name.


Thanks for taking your time to read this noob tutorial, lol.


Re: Changing the map name from "San Andreas" to your own map name. - gamer931215 - 17.08.2010

wow.... congratulations, this is the shortest tutorial ive ever seen :P but nice, didnt know that rcon command. i was searching for it at pawno.


Re: Changing the map name from "San Andreas" to your own map name. - (.Aztec); - 17.08.2010

Not too shabby, alot of people don't even know this exists.

You could also use a simple function I made, it does the exact same thing, but this is a bit "shorter", and looks better.

pawn Code:
forward SetMapName(mapName[]);

public SetMapName(mapName[])
{
    new string[30];
    format(string, sizeof(string), "mapname %s", mapName);
    SendRconCommand(string);
    return 1;
}

USAGE: SetMapName("Sky's World"); //would set the mapname to Sky's World



Re: Changing the map name from "San Andreas" to your own map name. - Las Venturas CNR - 17.08.2010

Quote:
Originally Posted by gamer931215
View Post
wow.... congratulations, this is the shortest tutorial ive ever seen :P but nice, didnt know that rcon command. i was searching for it at pawno.
Thanks for the comments

@Gamer: Look, I found a shorter one:

https://sampforum.blast.hk/showthread.php?tid=139618

And theres one which shows how to set your score on how much cash you got, but I can't find the link to that one.


Re: Changing the map name from "San Andreas" to your own map name. - Bolt3D08 - 15.12.2010

Thanks


Re: Changing the map name from "San Andreas" to your own map name. - Tessar - 15.12.2010

Thank you I've been trying to find out how to do that


Re: Changing the map name from "San Andreas" to your own map name. - [XA]PuNi$HeR_ - 17.12.2010

wait Tessar is that u its me CKUK. [CK]UnrealKiller heya u okay bud


Re: Changing the map name from "San Andreas" to your own map name. - [XA]PuNi$HeR_ - 17.12.2010

oh and thx for it i knew it just helps me for when ppl ask how to do it


Re: Changing the map name from "San Andreas" to your own map name. - MrDeath537 - 17.12.2010

Quote:
Originally Posted by (.Aztec);
View Post
Not too shabby, alot of people don't even know this exists.

You could also use a simple function I made, it does the exact same thing, but this is a bit "shorter", and looks better.

pawn Code:
forward SetMapName(mapName[]);

public SetMapName(mapName[])
{
    new string[30];
    format(string, sizeof(string), "mapname %s", mapName);
    SendRconCommand(string);
    return 1;
}

USAGE: SetMapName("Sky's World"); //would set the mapname to Sky's World
pawn Code:
#define SetMapName(%0) \
        SendRconCommand("mapname "%0)
Usage: SetMapName("Los Santos");


Re: Changing the map name from "San Andreas" to your own map name. - JaTochNietDan - 17.12.2010

You could also just add mapname to the server.cfg.