[Tutorial] Changing the map name from "San Andreas" to your own map name.
#1

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.
Reply
#2

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.
Reply
#3

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
Reply
#4

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.
Reply
#5

Thanks
Reply
#6

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

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

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

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");
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)