if (strcmp("/update", cmdtext, true, 10) == 0)//System Update CMD { if(!IsPlayerAdmin(playerid)) return UnknownText(playerid); if(IsPlayerAdmin(playerid)) { if(updatecheck == true) return SendClientMessage(playerid,COLOR_RED,"System Update Is Already On!"); SendClientMessageToAll(COLOR_YELLOW, "The Server Is Going To Be Updating In 10 Minutes"); updatecheck = true; SetTimer("CountDownText",1000,true); SetTimer("CountDownStraw",250,false); } return 1; }
public CountDownText(playerid) { TextDrawHideForPlayer(playerid, Textdraw20[playerid]); TextDrawHideForPlayer(playerid, Textdraw21[playerid]); countsec--; new string[128]; format(string, sizeof(string), "~y~System Update~w~:~r~ %d:%d", countmin, countsec); TextDrawSetString(Textdraw20[playerid], string); TextDrawShowForPlayer(playerid, Textdraw20[playerid]); TextDrawShowForPlayer(playerid, Textdraw21[playerid]); if(countsec == 0) { countsec = 60; countmin--; TextDrawShowForPlayer(playerid, Textdraw20[playerid]); return 1; } /////////////////////////////////////////////////////////// if(countmin == 0) { if(countsec == 1) { KillTimer(CountDownKill); TextDrawHideForPlayer(playerid, Textdraw20[playerid]); TextDrawHideForPlayer(playerid, Textdraw21[playerid]); TextDrawSetString(Textdraw20[playerid], "~y~System Update~w~:~r~ 0:0"); printf("[Update] The Update Time Is Up Now Updating Files..."); updatecheck = false; SendRconCommand("gmx"); } } return 1; }
public CountDownStraw(playerid) { TextDrawShowForPlayer(playerid, Textdraw20[playerid]); TextDrawShowForPlayer(playerid, Textdraw21[playerid]); }
Use a loop. That way you get all players instead of 'playerid' only now.
|