Advertisement
Guest User

Untitled

a guest
Feb 8th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. CMD:park(playerid, params[])
  2. {
  3. new string[128], idd;
  4. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti intr-un vehicul!");
  5. new car = GetPlayerVehicleID(playerid);
  6. if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "* Nu esti in unul dintre vehiculele tale personale!");
  7. idd = PersonalCar(playerid);
  8. if(CarInfo[idd][Spawned] != car) return SendClientMessage(playerid, COLOR_GREY, "Nu esti in vehiculul tau!");
  9. if(idd == 0) return SendClientMessage(playerid, COLOR_GREY, "Acest vehicul nu iti apartine!");
  10. new Float:x, Float:y, Float:z, Float:a;
  11. GetVehiclePos(car, x, y, z);
  12. GetVehicleZAngle(car, a);
  13. CarInfo[idd][cLocationx] = x;
  14. CarInfo[idd][cLocationy] = y;
  15. CarInfo[idd][cLocationz] = z;
  16. CarInfo[idd][cAngle] = a;
  17. VehicleOwned[CarInfo[idd][Spawned]] = 0;
  18. VehicleSQL[CarInfo[idd][Spawned]] = 0;
  19. DestroyVehicle(car);
  20. CheckVehicle(car);
  21. if(strlen(CarInfo[idd][cText]) >= 3) {
  22. DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]);
  23. }
  24. CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo],-1);
  25. VehicleOwned[CarInfo[idd][Spawned]] = CarInfo[idd][Spawned];
  26. VehicleSQL[CarInfo[idd][Spawned]] = idd;
  27. SetTunning(car);
  28. attach_vip_text(idd);
  29. SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]);
  30. mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE ID=%d", CarInfo[idd][cLocationx], idd);
  31. mysql_tquery(SQL, string, "", "");
  32. mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE ID=%d", CarInfo[idd][cLocationy], idd);
  33. mysql_tquery(SQL, string, "", "");
  34. mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE ID=%d", CarInfo[idd][cLocationz], idd);
  35. mysql_tquery(SQL, string, "", "");
  36. mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE ID=%d", CarInfo[idd][cAngle], idd);
  37. mysql_tquery(SQL, string, "", "");
  38. mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[idd][Spawned], idd);
  39. mysql_tquery(SQL, string, "", "");
  40. SCM(playerid, 0xFFBABAFF, "Vehicul parcat!");
  41. return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement