27.06.2011, 10:37
i have a update cmd and when i type it - it only shows for me and nobody else?
heres the cmd
and the timers
Count Down Text Timer
Count Down Straw Timer
please help ty
heres the cmd
Код:
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; }
Count Down Text Timer
Код:
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]); }