23.07.2011, 08:17
Try this one :')
Btw: https://sampforum.blast.hk/showthread.php?tid=268499
Forgot it, I wanted to test it (you must test a code before posting it), but I must reinstall GTA San Andreas: It's not working. Sorry, I couldn't test it yet. However, if you do:
/server gmx
It will restart the server (Atleast, it should do that
)
/server {any_other_name}
It will change the server's name to {any_other_name} and send to everyone a message.
/server Kwarde
It will change the server's name to Kwarde
Btw: https://sampforum.blast.hk/showthread.php?tid=268499
pawn Код:
CMD:server(playerid, params[])
{
if(IsPlayerAdmin(playerid)) return 0;
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /server <new name OR just gmx>");
if(!strcmp(params, "gmx")) return SendClientMessageToAll(COLOR_WHITE, "Server restart!"), SendRconCommand("gmx");
else
{
new str[128];
format(str, 128, "The server name's been changed to: %s", params[0]); //Try params[0] instead of params?
SendClientMessageToAll(COLOR_RED, str);
format(str, 128, "hostname %s", params[0]);
SendRconCommand(str);
return 1;
}
}
/server gmx
It will restart the server (Atleast, it should do that

/server {any_other_name}
It will change the server's name to {any_other_name} and send to everyone a message.
/server Kwarde
It will change the server's name to Kwarde