how to code an /shutdown command
#2

restart or shutdown?? u know they are different....
CMD:gmx(playerid, params[])
{
if(PlayerData[playerid][pAdmin] <= 5)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SavePlayerData(i);
}
SendClientMessageToAll(X11_DARK_RED, "An Admin commenced a server RESTART.");
SendRconCommand("gmx");
}
else
{
SendClientMessage(playerid, X11_RED, "You are not an admin level 5");
}
return 1;
}

if you want it shutdown do SendRconCommand("exit");
Reply


Messages In This Thread
how to code an /shutdown command - by matthew1211 - 03.04.2013, 00:19
Re: how to code an /shutdown command - by Ryan_Obeles - 03.04.2013, 01:04

Forum Jump:


Users browsing this thread: 1 Guest(s)