21.07.2017, 10:23
How to do a countdown on the text to the players to see?
have somebody can help me?
thanks!
just like that ↓
have somebody can help me?
thanks!
just like that ↓
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;
}
With this code you can add more countdowns. You just have to change CountDownerType numbers...
PHP код:
|