Advertisement
Guest User

Untitled

a guest
Jan 29th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. //du-te la #define si scri
  2. #define DIALOG_GPS 666
  3. //dupa la new .
  4. new Pass[MAX_PLAYERS];//pass == sa nu se creeze buguri .P.S Daca ai definit prin gm ceva gen "CP[playerid]" Nu mai definesti si "Pass"
  5.  
  6.  
  7. //Comanda care iti deschide un dialog cu locatiile
  8. CMD:gps(playerid, params[])
  9. {
  10. ShowPlayerDialog(playerid, DIALOG_GPS, DIALOG_STYLE_LIST,"Gps","Banca Ls","Select","Cancel");
  11. return 1;
  12. }
  13. //te duci la ondialogresponse pentru a pune functie pe acel dialog.
  14.  
  15. if(dialogid == DIALOG_GPS)
  16. {
  17. if(response)
  18. {
  19. if(listitem == 0)
  20. {
  21. Pass[playerid] = 1;
  22. SetPlayerCheckpoint(plyareid, 0.0,0.0,0.0,15.0)//Pui tu coordonatele care le doresti. /save <nume> in game.
  23. SendClientmessage(playerid, -1,"'GPS:Ti-am pus un checkpoint pe harta.");
  24. }
  25. }
  26. }
  27. //intri in checkpoint
  28. //te duci la OnPlayerEnterCheckpoint(playerid) si pui asta.
  29.  
  30. if(Pass[playerid] == 1)
  31. {
  32. DisablePlayerCheckpoint(playerid);
  33. Pass[playerid] = 0;
  34. SendClientmessage(playerid, -1, "GPS:Ai ajuns la destinatie");
  35. }
  36.  
  37.  
  38.  
  39. //tot ce are in fata "//" poti sterge .
  40. //Sper ca am fost destul de explicit.
  41. //Daca gasesti errori posteaza-le.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement