11.01.2017, 15:02
But this can also work witthout playerid param (I am not using foreach)
Код:
forward CountDown1(); public CountDown1() { for (new Player; Player < MAX_PLAYERS; Player++) { //Replace all "playerid" by "Player" if(IsPlayerInDynamicCP(Player, CP[CAPZONE]) && UnderAttack[CAPZONE] == 1 && IsPlayerCapturing[Player][CAPZONE] == 1) { CountVar[Player][CAPZONE]--; new str1[124]; TextDrawShowForPlayer(playerid, CountText[Player]); format(str1, sizeof(str1),"~r~%d seconds ~w~left to ~g~capture", CountVar[Player][CAPZONE]); TextDrawSetString(CountText[Player], str1); } } return 1; }