21.07.2017, 11:25
With this code you can add more countdowns. You just have to change CountDownerType numbers...
PHP код:
new CountDownerType[max_players],
CountDownLeft[max_players];
public OnGameModeInit(){
SetTimer("CountDown",1000,true);
return 1;
}
forward CountDown();
public CountDown(){
new s[50];
foreach(Player,i){
switch(CountDownerType[i]){
case 1:{
format(s,sizoef(s),"POLICE FIND YOU: %d SECONDS",--CountDownLeft[i]);
PlayerTextDrawSetString(i,PTD_CountDown[i],s);
if(!CountDownLeft[i]){
CountDownerType[i]=0;
PlayerTextDrawHide(i, PTD_CountDown[i]);
}
}
}
}
return 1;
}