Guest User

Untitled

a guest
Jul 1st, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. YCMD:zakaci(playerid,params[], help)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. if(PlayerInfo[playerid][pLider] == 8 || PlayerInfo[playerid][pClan] == 8)
  6. {
  7. if(ParkingAuta(GetPlayerVehicleID(playerid)))
  8. {
  9. if (GetVehicleModel(GetPlayerVehicleID(playerid)) == 525)
  10. {
  11. if(GetPlayerState(playerid)==2)
  12. {
  13. new Float:pX,Float:pY,Float:pZ;
  14. GetPlayerPos(playerid,pX,pY,pZ);
  15. new Float:vX,Float:vY,Float:vZ;
  16. new Found=0;
  17. new vid=0;
  18. while((vid<MAX_VOZILA)&&(!Found))
  19. {
  20. vid++;
  21. GetVehiclePos(vid,vX,vY,vZ); //OVO JE TA LINIJA KOJA IMA ERROR
  22. if ((floatabs(pX-vX)<7.0)&&(floatabs(pY-vY)<7.0)&&(floatabs(pZ-vZ)<7.0)&&(vid!=GetPlayerVehicleID(playerid)))
  23. {
  24. Found=1;
  25. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
  26. {
  27. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  28. }
  29. else
  30. {
  31. AttachTrailerToVehicle(vid,GetPlayerVehicleID(playerid));
  32. }
  33. }
  34. }
  35. if(!Found)
  36. {
  37. SendClientMessage(playerid,0xFFFF00AA,"[BS:RP] Nema automobila u blizini.");
  38. }
  39. }
  40. else
  41. {
  42. SendClientMessage(playerid, COLOR_GRAD2, "[BS:RP] Morate biti na mjestu vozaca.");
  43. return 1;
  44. }
  45. }
  46. else
  47. {
  48. SendClientMessage(playerid, COLOR_GRAD2, "[BS:RP] Morate biti u pauku da bi mogli ovo koristit");
  49. return 1;
  50. }
  51. }
  52. else
  53. {
  54. SendClientMessage(playerid, COLOR_GRAD2, "[BS:RP] Morate biti u vozilu da biste koristili ovu komandu.");
  55. return 1;
  56. }
  57. }
  58. else
  59. {
  60. SendClientMessage(playerid,COLOR_GRAD2,"[BS:RP] Morate biti clan parking servisa da bi koristili ovu komandu.");
  61. return 1;
  62. }
  63. }
  64. return 1;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment