Help! Text help! I am a Novice
#1

How to do a countdown on the text to the players to see?

have somebody can help me?

thanks!

just like that ↓
Reply
#2

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(iPTD_CountDown[i]);
                }
            }
        }
    }
    return 
1;

Reply
#3

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
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(iPTD_CountDown[i]);
                }
            }
        }
    }
    return 
1;

Thanks bro! Thank you, you helped me a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)