Advertisement
Axll

[exemplo] evandro desafio;

Jul 26th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.01 KB | None | 0 0
  1. new timerdesafio_inicio[MAX_PLAYERS];
  2. new timerdesafio_tempo[MAX_PLAYERS];
  3.  
  4. command(desafio, playerid, params []) {
  5.     if(sscanf(params, "i", playerold)) return SendClientMessage(playerid, -1, "erro, use /desafio [playerid]");
  6.     SetPlayerPos(playerid, x, y, z);
  7.     SetPlayerPos(playeridold, x, y, z);
  8.     TogglePlayerControllable(playerid, false);
  9.     TogglePlayerControllable(playeridold, false);
  10.    
  11.     timerdesafio_inicio[playerid] = SetTimerEx("TimerDesafio_Inicio", 1000, true, "ii", playerid, playerold);
  12.     return true;
  13. }
  14.  
  15. forward TimerDesafio_Inicio(playerid, playerold);
  16. public TimerDesafio_Inicio(playerid, playerold) {
  17.     timerdesafio_tempo[playerid]++;
  18.     GameTextForPlayer(playerid, timerdesafio_tempo[playerid], 998, 1);
  19.     if(timerdesafio_tempo[playerid] == 5) {
  20.         GameTextForPlayer(playerid, "GO GO GO", 998, 1);
  21.         TogglePlayerControllable(playerid, true);
  22.         TogglePlayerControllable(playeridold, true);
  23.         return true;
  24.     }
  25.     else GameTextForPlayer(playerid, timerdesafio_tempo[playerid], 998, 1);
  26.     return true;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement