CMD:gmx(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 99999) { SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command."); return 1; } SetTimer( "Maintenance", 50000, false ); SendClientMessageToAll(COLOR_LIGHTBLUE, "* The Server Will Be Going For Server Maintenance In 50Seconds."); foreach(Player, i) { GameTextForPlayer(i, "~y~Scheduled Maintenance 50Seconds", 5000, 3); } return 1; }
CMD:restart(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1337) { restarting = 1; GameModeInitExitFunc(); } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !"); } } return 1; }
SendRconCommand( "gmx" );
SendRconCommand("gmx");
CMD:restart(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
return SendClientMessage(playerid, -1, "You are not an admin!");
SendRconCommand( "gmx" );
return 1;
}
pawn Код:
|
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You must be logged into RCON to use this command.");
CMD:gmx(playerid, params[]) { if(IsPlayerAdmin(playerid)) { SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command."); return 1; } SetTimer( "Maintenance", 50000, false ); SendClientMessageToAll(COLOR_LIGHTBLUE, "* The Server Will Be Going For Server Maintenance In 50Seconds."); foreach(Player, i) { GameTextForPlayer(i, "~y~Scheduled Maintenance 50Seconds", 5000, 3); } return 1; }
CMD:restart(playerid, params[]) { if(IsPlayerConnected(playerid)) { if(IsPlayerAdmin(playerid)) { restarting = 1; GameModeInitExitFunc(); } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !"); } } return 1; }