ZCMD Problem
#4

Try this one :')
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;
    }
}
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
Reply


Messages In This Thread
ZCMD Problem - by NeyMar96 - 23.07.2011, 04:22
Re: ZCMD Problem - by JaTochNietDan - 23.07.2011, 04:25
Re: ZCMD Problem - by NeyMar96 - 23.07.2011, 04:32
Re: ZCMD Problem - by Kwarde - 23.07.2011, 08:17

Forum Jump:


Users browsing this thread: 1 Guest(s)