how to code an /shutdown command
#1

how do i code an /shutdown command to restart my server what locks user accounts etc so they dont lose their money etc
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)