Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:park(playerid, params[])
- {
- new string[128], idd;
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti intr-un vehicul!");
- new car = GetPlayerVehicleID(playerid);
- if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "* Nu esti in unul dintre vehiculele tale personale!");
- idd = PersonalCar(playerid);
- if(CarInfo[idd][Spawned] != car) return SendClientMessage(playerid, COLOR_GREY, "Nu esti in vehiculul tau!");
- if(idd == 0) return SendClientMessage(playerid, COLOR_GREY, "Acest vehicul nu iti apartine!");
- new Float:x, Float:y, Float:z, Float:a;
- GetVehiclePos(car, x, y, z);
- GetVehicleZAngle(car, a);
- CarInfo[idd][cLocationx] = x;
- CarInfo[idd][cLocationy] = y;
- CarInfo[idd][cLocationz] = z;
- CarInfo[idd][cAngle] = a;
- VehicleOwned[CarInfo[idd][Spawned]] = 0;
- VehicleSQL[CarInfo[idd][Spawned]] = 0;
- DestroyVehicle(car);
- CheckVehicle(car);
- if(strlen(CarInfo[idd][cText]) >= 3) {
- DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]);
- }
- 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);
- VehicleOwned[CarInfo[idd][Spawned]] = CarInfo[idd][Spawned];
- VehicleSQL[CarInfo[idd][Spawned]] = idd;
- SetTunning(car);
- attach_vip_text(idd);
- SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]);
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE ID=%d", CarInfo[idd][cLocationx], idd);
- mysql_tquery(SQL, string, "", "");
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE ID=%d", CarInfo[idd][cLocationy], idd);
- mysql_tquery(SQL, string, "", "");
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE ID=%d", CarInfo[idd][cLocationz], idd);
- mysql_tquery(SQL, string, "", "");
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Angle='%f' WHERE ID=%d", CarInfo[idd][cAngle], idd);
- mysql_tquery(SQL, string, "", "");
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[idd][Spawned], idd);
- mysql_tquery(SQL, string, "", "");
- SCM(playerid, 0xFFBABAFF, "Vehicul parcat!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement