Advertisement
KnifeX

t3countdown

Jul 18th, 2020
1,349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.83 KB | None | 0 0
  1. new TimerT3,T3Count;
  2. CMD:t3countdown(playerid,params[]) {
  3.     #pragma unused params
  4.     if(PlayerInfo[playerid][T3] < 12) return SendClientMessage(playerid, 0xFF0000AA, "You have to be T3 rank 12+ to use this command");
  5.     TimerT3 = SetTimer("T3Count1",1000,1);
  6.     T3Count=6;
  7.     return 1;
  8. }
  9.  
  10. forward T3Count1();
  11. public T3Count1() {
  12.     T3Count= T3Count - 1;
  13.     for(new i = 0; i < MAX_PLAYERS; i++) {
  14.         if(IsPlayerConnected(i) && PlayerInfo[i][T3] > 0) {
  15.             if(T3Count==0){
  16.                 KillTimer(TimerT3);
  17.                 GameTextForPlayer(i,"~g~GO!", 3000, 6);
  18.                 PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  19.             }else{
  20.                 new string[32];
  21.                 format(string,sizeof string,"~r~T3 Countdown: ~w~%d",T3Count);
  22.                 GameTextForPlayer(i, string, 1000, 6);
  23.                 PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  24.             }
  25.         }
  26.     }
  27.     return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement