SA-MP Forums Archive
ServerName - 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)
+--- Thread: ServerName (/showthread.php?tid=389883)



ServerName - Akcent_Voltaj - 03.11.2012

hi im trying to make a cmd "/servername [name]" so it changed servers name..get it??please help!

SendRconCommand


Re: ServerName - Akcent_Voltaj - 03.11.2012

anyone help??


Re: ServerName - Deaglez - 04.11.2012

You dont need to do that.

Just type in this cmd in the game:

Код:
/rcon hostname "Your Server Name" //Without the quotes



Re: ServerName - s4kuL - 04.11.2012

pawn Код:
COMMAND:svname(playerid,params[])
{
    new servername,string[150],Name[24],string2[200];
    GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params,"s",servername)) return SendClientMessage(playerid,-1,"USAGE: /svname [name]");
    format(string,sizeof(string),"hostname %s",servername);
    SendRconCommand(string);
    format(string2,sizeof(string2),"Admin: %s changed the name of the server to: %s",Name(playerid),servername);
    SendClientMessageToAll(-1,string2);
    return 1;
}