04.09.2011, 10:16
Quote:
SetTimer will get called as many times as there are players in range of point. I would do the following operation: Remove red and add green.
Код:
public CountDown() { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid,X,Y,Z); for(new i = 0; i < MAX_PLAYERS; i++) foreach(Player,i) { GetPlayerPos(i,X,Y,Z); if(IsPlayerInRangeOfPoint(i, 10.0, X, Y, Z)) { if (Count > 0) { GameTextForPlayer(i, CountText[Count-1], 2500, 3); Count--; SetTimer("CountDown", 1000, 0); } else { GameTextForPlayer(i,"~g~Go Go Go!!!", 2500, 3); } } } if(Count > 0) SetTimer("CountDown", 1000, 0); return 1; } |