Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 2: { // tow
- if(CarInfo[vsid][Spawned] == 0) return SendClientMessage(playerid, COLOR_GREY, "Masina ta nu este spawnata!");
- if(GetPlayerCash(playerid) < 500) return SendClientMessage(playerid, COLOR_GREY, "Nu ai $500!");
- if(IsVehicleOccupied(CarInfo[vsid][Spawned])) return SendClientMessage(playerid, COLOR_GREY, "Vehiculul este ocupat!");
- SetVehicleToRespawn(CarInfo[vsid][Spawned]);
- SetTunning(vsid);
- GivePlayerCash(playerid, -500);
- BizzInfo[11][bBalance] += 500;
- mysql_format(SQL, string,sizeof(string),"UPDATE bizz SET Till = %d WHERE ID = %d",BizzInfo[11][bBalance],5);
- mysql_tquery(SQL, string, "", "");
- format(string, sizeof(string), "Vehiculul tau, %s, este acum in locul parcarii.", aVehicleNames[CarInfo[vsid][cModel]-400]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- case 3: { // despawn & spawn
- if(CarInfo[vsid][Spawned] == 0) {
- CarInfo[vsid][Spawned] = CreateVehicleEx(CarInfo[vsid][cModel],CarInfo[vsid][cLocationx],CarInfo[vsid][cLocationy],CarInfo[vsid][cLocationz],CarInfo[vsid][cAngle],CarInfo[vsid][cColorOne],CarInfo[vsid][cColorTwo],-1);
- VehicleOwned[CarInfo[vsid][Spawned]] = CarInfo[vsid][Spawned];
- VehicleSQL[CarInfo[vsid][Spawned]] = vsid;
- attach_vip_text(vsid);
- SetTunning(CarInfo[vsid][Spawned]);
- CheckVehicle(CarInfo[vsid][Spawned]);
- if(CarInfo[PlayerInfo[playerid][pCarKey][0]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][0] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][1]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][1] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][2]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][2] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][3]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][3] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][4]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][4] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][5]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][5] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][6]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][6] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][7]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][7] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][8]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][8] = 5000;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][9]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][9] = 5000;
- format(string, sizeof(string), "Vehiculul tau, %s, este acum spawnat.", aVehicleNames[CarInfo[vsid][cModel]-400]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- new engine,lights,alarm,doors,bonnet,boot,objective;
- GetVehicleParamsEx(CarInfo[vsid][Spawned],engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(CarInfo[vsid][Spawned],engine,lights,alarm,CarInfo[vsid][cLock],bonnet,boot,objective);
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[vsid][Spawned], vsid);
- mysql_tquery(SQL, string, "", "");
- }
- else {
- if(IsVehicleOccupied(CarInfo[vsid][Spawned])) return SendClientMessage(playerid, COLOR_GREY, "Vehiculul este ocupat!");
- if(CarInfo[PlayerInfo[playerid][pCarKey][0]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][0] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][1]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][1] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][2]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][2] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][3]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][3] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][4]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][4] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][5]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][5] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][6]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][6] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][7]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][7] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][8]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][8] = -1;
- else if(CarInfo[PlayerInfo[playerid][pCarKey][9]][Spawned] == CarInfo[vsid][Spawned] && vsid != 0) DespawnCar[playerid][9] = -1;
- if(strlen(CarInfo[vsid][cText]) >= 3) {
- DestroyDynamicObject(nameobject[CarInfo[vsid][Spawned]]);
- }
- DestroyVehicle(CarInfo[vsid][Spawned]);
- VehicleOwned[CarInfo[vsid][Spawned]] = 0;
- VehicleSQL[CarInfo[vsid][Spawned]] = 0;
- SetTunning(CarInfo[vsid][Spawned]);
- CheckVehicle(CarInfo[vsid][Spawned]);
- CarInfo[vsid][Spawned] = 0;
- format(string, sizeof(string), "Vehiculul tau, %s, este acum despawnat.", aVehicleNames[CarInfo[vsid][cModel]-400]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- mysql_format(SQL, string, sizeof(string), "UPDATE cars SET Spawned='%d' WHERE ID=%d", CarInfo[vsid][Spawned], vsid);
- mysql_tquery(SQL, string, "", "");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment