Guest User

/aparkcar

a guest
Sep 29th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. YCMD:aparkcar(playerid, params[], help)
  2. {
  3. #pragma unused params
  4. #pragma unused help
  5. if (PlayerInfo[playerid][pAdmin] < 0) return SCM (playerid, -1, "Niste ovlasceni da koristite ovu komandu !");
  6. else
  7. {
  8. new
  9. Float:x,
  10. Float:y,
  11. Float:z,
  12. Float:a,
  13. carid;
  14. carid = GetPlayerVehicleID(playerid);
  15. GetVehiclePos(carid, x, y, z);
  16. GetVehicleZAngle(carid, a);
  17. if(IsAnOwnableCar(carid))
  18. {
  19. CarInfo[carid][cLocationx] = x;
  20. CarInfo[carid][cLocationy] = y;
  21. CarInfo[carid][cLocationz] = z;
  22. CarInfo[carid][cAngle] = a;
  23. OnPropUpdate(4, carid);
  24. DestroyVehicle(carid);
  25. CreateVehicle(CarInfo[carid][cModel], CarInfo[carid][cLocationx], CarInfo[carid][cLocationy], CarInfo[carid][cLocationz]+1.0, CarInfo[carid][cAngle], CarInfo[carid][cColorOne], CarInfo[carid][cColorTwo], 60000);
  26. if(CarInfo[carid][cPaintjob] != 999)
  27. {
  28. ChangeVehiclePaintjob(carid, CarInfo[carid][cPaintjob]);
  29. }
  30. SetVehicleVirtualWorld(carid, CarInfo[carid][cVirWorld]);
  31. SetVehicleModifications(carid);
  32. PutPlayerInVehicle(playerid, carid, 0);
  33. }
  34. else
  35. {
  36. SendClientMessage(playerid, -1, "Ne mozete parkirati ovo vozilo !");
  37. }
  38. }
  39. return 1;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment