Code: Select all
if(strcmp(cmd, "/upload", true) == 0) // By Ingus_Smith
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 6 || IsPlayerAdmin(playerid))
{
GameTextForAll("~r~Restarting the Server: ~n~~p~Uploading new Scripts!",12000,0);
SendClientMessageToAll(COLOR_NICERED, "Server Update, Restarting, Please Wait!");
SendClientMessageToAll(COLOR_YELLOW,"Restart may take a while due to file saves, please be patient!");
format(string, sizeof(string), "[ADMIN]: %s Has Restarted The Server",sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
UpdateAllPlayersPosition();
SaveAllGuns();
GameModeExitFunc(playerid);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Restarted the GameMode (/upload)",d,m,y,h,mi,s,sendername);
LoginLog(string);
AdminLog(string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
}
return 1;
}