Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. if(strcmp(cmd, "/getpersonalcar", true) == 0 || strcmp(cmd, "/getpcar", true) == 0)
  2. {
  3. if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
  4. {
  5. tmp = strtok(cmdtext, idx);
  6. if(!strlen(tmp))
  7. {
  8. SendClientMessage(playerid, COLOR_WHITE, "{03A494}Foloseste:{FFFFFF} /getpcar (1,2,3)");
  9. return 1;
  10. }
  11. if(IsPlayerInAnyVehicle(playerid))
  12. {
  13. SendClientMessage(playerid,COLOR_WHITE,"Pentru a folosi comanda, trebuie sa iesi din masina!");
  14. return 1;
  15. }
  16. new car = PlayerInfo[playerid][pPcarkey];
  17. new car2 = PlayerInfo[playerid][pPcarkey2];
  18. new car3 = PlayerInfo[playerid][pPcarkey3];
  19. new Float:plocx,Float:plocy,Float:plocz;
  20. new pcar = strval(tmp);
  21. if (pcar == 1)
  22. {
  23. if(car != 999)
  24. {
  25. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  26. GetPlayerPos(playerid, plocx, plocy, plocz);
  27. SetVehiclePos(car,plocx,plocy+4, plocz);
  28. }
  29. else { SendClientMessage(playerid, COLOR_RED, "Nu ai vehicul pe primul slot!"); }
  30. }
  31. else if (pcar == 2)
  32. {
  33. if(car2 != 999)
  34. {
  35. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  36. GetPlayerPos(playerid, plocx, plocy, plocz);
  37. SetVehiclePos(car2,plocx,plocy+4, plocz);
  38. }
  39. else { SendClientMessage(playerid, COLOR_RED, "Nu ai vehicul pe al doilea slot!"); }
  40. }
  41. else if (pcar == 3)
  42. {
  43. if(car3 != 999)
  44. {
  45. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  46. GetPlayerPos(playerid, plocx, plocy, plocz);
  47. SetVehiclePos(car3,plocx,plocy+4, plocz);
  48. }
  49. else { SendClientMessage(playerid, COLOR_RED, "Nu ai vehicul pe al treilea slot!"); }
  50. }
  51. }
  52. return 1;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement