Guest User

Untitled

a guest
Jan 13th, 2011
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.64 KB | None | 0 0
  1.  
  2.  
  3. //no topo:
  4. new cp1;
  5. new cp2;
  6.  
  7. //no OnGameModeInit:
  8. cp1 = CPS_AddCheckpoint(x, y, z, 3.0, 40);
  9. cp2 = CPS_AddCheckpoint(x, y, z, 3.0, 40);
  10.  
  11. //no OnPlayerEnterCheckpoint:
  12. new checkpointid = CPS_GetPlayerCheckpoint(playerid);
  13.  
  14. if(checkpointid == cp1)
  15. {
  16.     //vc entrou on CP 1...
  17. }
  18.  
  19. if(checkpointid == cp2)
  20. {
  21.     //vc entrou no CP 2...
  22. }
  23.  
  24. //só isso...
  25. //ai pra comando:
  26.  
  27. if(!strcmp(cmdtext, "/comando", true))
  28. {
  29.     if(CPS_IsPlayerInCheckpoint(playerid, cp1)) //só mudar a variavel do CP
  30.     {
  31.         //voce está no cp1
  32.     } else {
  33.         //você não está no cp 1, e não pode usar este comando
  34.     }
  35.     return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment