Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(dialogid == DIALOG_VEHSPAWNCAR)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new i = SelectedCar[playerid],strings[256];
- new speed = MySQLCheckSpeed(PlayerInfo[playerid][pCarModel][i]);
- if(PlayerInfo[playerid][pCarBlock][i] > 0) format(strings,sizeof(strings),"Vehicle Model: %d\nDistance Traveled: %.0f KM\nVehicle Age: %d days\nInsurance Price: $%s\nInsurance Points: %d\nTop speed: %d km/h\nBlocked for: %d hours",PlayerInfo[playerid][pCarModel][i],PlayerInfo[playerid][pCarKM][i],GetDaysFromTimestamp(PlayerInfo[playerid][pCarBuyTime][i]),FormatNumber(PlayerInfo[playerid][pCarInsPrice][i]),PlayerInfo[playerid][pCarIns][i],speed,PlayerInfo[playerid][pCarBlock][i]);
- else format(strings,sizeof(strings),"Vehicle Model: %d\nDistance Traveled: %.0f KM\nVehicle Age: %d days\nInsurance Price: $%s\nInsurance Points: %d\nTop speed: %d km/h",PlayerInfo[playerid][pCarModel][i],PlayerInfo[playerid][pCarKM][i],GetDaysFromTimestamp(PlayerInfo[playerid][pCarBuyTime][i]),FormatNumber(PlayerInfo[playerid][pCarInsPrice][i]),PlayerInfo[playerid][pCarIns][i],speed);
- ShowPlayerDialog(playerid,DIALOG_VEHINFO,DIALOG_STYLE_MSGBOX,"Vehicle Info",strings,"Close","");
- }
- if(listitem == 1)
- {
- new i = SelectedCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective;
- if(IsTrailerAttachedToVehicle(PlayerInfo[playerid][pCarID][i])) return SendClientMessage(playerid, COLOR_WHITE, "On a mission right now, can't use this command.");
- if(!CarTow(PlayerInfo[playerid][pCarID][i]) && PlayerInfo[playerid][pCarID][i] != 0) return SendClientMessage(playerid, COLOR_GREY, "The car is in use and it can't be towed.");
- if(PlayerInfo[playerid][pCarID][i] != 0) DestroyVehicle(PlayerInfo[playerid][pCarID][i]);
- LoadCar(playerid);
- PlayerInfo[playerid][pCarID][i] = CreateVehicle(PlayerInfo[playerid][pCarModel][i],PlayerInfo[playerid][pCarLocX][i],PlayerInfo[playerid][pCarLocY][i],PlayerInfo[playerid][pCarLocZ][i],PlayerInfo[playerid][pCarAngle][i],PlayerInfo[playerid][pCarColor1][i],PlayerInfo[playerid][pCarColor2][i],-1);
- SetVehicleNumberPlate(PlayerInfo[playerid][pCarID][i], CarPlate[playerid][i]);
- SetVehicleHealth(PlayerInfo[playerid][pCarID][i], PlayerInfo[playerid][pCarHP][i]);
- UpdateVehicleDamageStatus(PlayerInfo[playerid][pCarID][i], PlayerInfo[playerid][pCarDamage1][i], PlayerInfo[playerid][pCarDamage2][i], PlayerInfo[playerid][pCarDamage3][i], PlayerInfo[playerid][pCarDamage4][i]);
- Gas[PlayerInfo[playerid][pCarID][i]] = PlayerInfo[playerid][pCarGas][i];
- if(PlayerInfo[playerid][pCarLock][i] == 0)
- {
- GetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],VEHICLE_PARAMS_OFF,lights,alarm,0,bonnet,boot,objective);
- }
- else
- {
- GetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],VEHICLE_PARAMS_OFF,lights,alarm,1,bonnet,boot,objective);
- }
- for(new d; d < 17; d++)
- {
- if(CarMod[playerid][i][d] != 0) AddVehicleComponent(PlayerInfo[playerid][pCarID][i],CarMod[playerid][i][d]);
- }
- ChangeVehiclePaintjob(PlayerInfo[playerid][pCarID][i], PlayerInfo[playerid][pCarPaintJ][i]);
- vehEngine[PlayerInfo[playerid][pCarID][i]] = 0;
- if(strlen(CarVipName[playerid][i]) > 0)
- {
- SetVipText(playerid, i);
- }
- SendClientMessage(playerid, COLOR_GREY, "Your car has been respawned.");
- }
- if(listitem == 2)
- {
- new i = SelectedCar[playerid],engine,lights,alarm,doors,bonnet,boot,objective;
- if(IsTrailerAttachedToVehicle(PlayerInfo[playerid][pCarID][i])) return SendClientMessage(playerid, COLOR_WHITE, "On a mission right now, can't use this command.");
- if(!CarTow(PlayerInfo[playerid][pCarID][i]) && PlayerInfo[playerid][pCarID][i] != 0) return SendClientMessage(playerid, COLOR_GREY, "The car is in use and it can't be towed.");
- if(PlayerInfo[playerid][pCarID][i] != 0) DestroyVehicle(PlayerInfo[playerid][pCarID][i]);
- LoadCar(playerid);
- PlayerInfo[playerid][pCarID][i] = CreateVehicle(PlayerInfo[playerid][pCarModel][i],PlayerInfo[playerid][pCarLLocX][i],PlayerInfo[playerid][pCarLLocY][i],PlayerInfo[playerid][pCarLLocZ][i],PlayerInfo[playerid][pCarAngle2][i],PlayerInfo[playerid][pCarColor1][i],PlayerInfo[playerid][pCarColor2][i],-1);
- SetVehicleNumberPlate(PlayerInfo[playerid][pCarID][i], CarPlate[playerid][i]);
- SetVehicleHealth(PlayerInfo[playerid][pCarID][i], PlayerInfo[playerid][pCarHP][i]);
- UpdateVehicleDamageStatus(PlayerInfo[playerid][pCarID][i], PlayerInfo[playerid][pCarDamage1][i], PlayerInfo[playerid][pCarDamage2][i], PlayerInfo[playerid][pCarDamage3][i], PlayerInfo[playerid][pCarDamage4][i]);
- Gas[PlayerInfo[playerid][pCarID][i]] = PlayerInfo[playerid][pCarGas][i];
- if(PlayerInfo[playerid][pCarLock][i] == 0)
- {
- GetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],VEHICLE_PARAMS_OFF,lights,alarm,0,bonnet,boot,objective);
- }
- else
- {
- GetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(PlayerInfo[playerid][pCarID][i],VEHICLE_PARAMS_OFF,lights,alarm,1,bonnet,boot,objective);
- }
- for(new d; d < 17; d++)
- {
- if(CarMod[playerid][i][d] != 0) AddVehicleComponent(PlayerInfo[playerid][pCarID][i],CarMod[playerid][i][d]);
- }
- ChangeVehiclePaintjob(PlayerInfo[playerid][pCarID][i], PlayerInfo[playerid][pCarPaintJ][i]);
- vehEngine[PlayerInfo[playerid][pCarID][i]] = 0;
- if(strlen(CarVipName[playerid][i]) > 0)
- {
- SetVipText(playerid, i);
- }
- SendClientMessage(playerid, COLOR_GREY, "Your car has been respawned.");
- }
- if(listitem == 3)
- {
- new i = SelectedCar[playerid];
- if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_WHITE, "{FFF8C6}On a mission right now, can't use this command.");
- if(BusinessRob[playerid] > 0) return SendClientMessage(playerid,COLOR_WHITE,"You can't use this while robbing the bank.");
- if(CP[playerid] < 1 && !IsATruck(GetPlayerVehicleID(playerid)) && CheckBus[playerid] < 1 && GotoMats[playerid] < 1)
- {
- if(PlayerInfo[playerid][pCarID][i] != 0)
- {
- LocateCar(PlayerInfo[playerid][pCarID][i],playerid);
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "This vehicle is not spawned.");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_JOBULETES, DIALOG_STYLE_MSGBOX, "Anulare Checkpoint", "Esti sigur ca vrei sa anulezi checkpoint-ul curent?", "Da", "Nu");
- }
- }
- if(listitem == 4)
- {
- new i = SelectedCar[playerid];
- new inscarpricee = PlayerInfo[playerid][pCarInsPrice][i],stringul[200];
- if(PlayerInfo[playerid][pCarIns][i] < 5)
- {
- if(GetPlayerCash(playerid) >= inscarpricee)
- {
- format(stringul,sizeof(stringul),"You want to buy 1 insurance for $%d?",inscarpricee);
- ShowPlayerDialog(playerid, DIALOG_INSURANCEBUY, DIALOG_STYLE_MSGBOX, "Insurance", stringul, "Yes", "No");
- }
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_INSURANCEBUY2, DIALOG_STYLE_MSGBOX, "Insurance", "You can't have more than 5 insurance", "OK", "");
- }
- }
- if(listitem == 5)
- {
- if(PlayerInfo[playerid][pPremiumPoints] <= 19) return ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points to do this.", "Close", "");
- ShowPlayerDialog(playerid, DIALOG_BUYCLEARKM2, DIALOG_STYLE_MSGBOX, "Clear KM & Days", "Do you want to pay 20 premium points to clear your car km and days?","Yes","No");
- }
- if(listitem == 6)
- {
- if(PlayerInfo[playerid][pPremiumPoints] <= 99) return ShowPlayerDialog(playerid, DIALOG_NOPP, DIALOG_STYLE_MSGBOX, "Not enough points", "You don't have enough premium points.\nNu ai suficiente puncte premium.", "Ok", "");
- new idcar = SelectedCar[playerid];
- if(PlayerInfo[playerid][pCarVIP][idcar] == 1) return SS(playerid, COLOR_LIGHTGREEN3, "Acest vehicul este deja VIP.", "This vehicle is already VIP.");
- if(PlayerInfo[playerid][pCarModel][idcar] != 411 && PlayerInfo[playerid][pCarModel][idcar] != 541 && PlayerInfo[playerid][pCarModel][idcar] != 560) return SS(playerid, COLOR_LIGHTGREEN3, "Momentan doar vehiculele Infernus, Bullet si Sultan pot fi upgradate.", "This option can only be used for Infernus, Bullet and Sultan vehicles.");
- ShowPlayerDialog(playerid, DIALOG_BUYVIPCAR, DIALOG_STYLE_MSGBOX, "VIP Vehicle", "Do you want to pay 100 premium points to make this vehicle VIP?","Yes","No");
- }
- if(listitem == 7)
- {
- new i = SelectedCar[playerid];
- if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_WHITE, "{FFF8C6}On a mission right now, can't use this command.");
- if(BusinessRob[playerid] > 0) return SendClientMessage(playerid,COLOR_WHITE,"You can't use this while robbing the bank.");
- if(CP[playerid] < 1 && !IsATruck(GetPlayerVehicleID(playerid)) && CheckBus[playerid] < 1 && GotoMats[playerid] < 1)
- {
- if(PlayerInfo[playerid][pCarID][i] != 0)
- {
- if(PlayerInfo[playerid][pLanguage] == 1) ShowPlayerDialog(playerid, DIALOG_UNSTUCK, DIALOG_STYLE_MSGBOX, "Unstuck car", "This option was created for those who can't find the car using /findcar.\nUsing this option your car will be spawned in a parking lot in LV.\n\nAre you sure you want to do this?", "Yes", "No");
- else if(PlayerInfo[playerid][pLanguage] == 2) ShowPlayerDialog(playerid, DIALOG_UNSTUCK, DIALOG_STYLE_MSGBOX, "Unstuck car", "Aceasta optiune a fost creata pentru cei care nu-si pot gasi masina folosind /findcar.\nFolosind aceasta optiune vei avea masina spawnata intr-o parcare din LV.\n\nEsti sigur ca vrei sa faci asta?", "Da", "Nu");
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "This vehicle is not spawned.");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_JOBULETES, DIALOG_STYLE_MSGBOX, "Anulare Checkpoint", "Esti sigur ca vrei sa anulezi checkpoint-ul curent?", "Da", "Nu");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement