Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_CARSHOP)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 250 {
- if CarShopCar[playerid] != -1 {
- DestroyVehicle(CarShopCar[playerid]);
- CarShopCar[playerid] = -1;
- }
- CarShopCar[playerid] = CreateVehicle(411,1776.6417,-1929.3938,13.1665,0.6010,-1,-1,-1);
- GivePlayerMoney(playerid, -250);
- }
- }
- if(listitem == 1)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 350 {
- if CarShopCar[playerid] != -1 {
- DestroyVehicle(CarShopCar[playerid]);
- CarShopCar[playerid] = -1;
- }
- CarShopCar[playerid] = CreateVehicle(451,1776.6417,-1929.3938,13.1665,0.6010,-1,-1,-1);
- GivePlayerMoney(playerid, -350);
- }
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_JETPACKANDPARACHUTESHOP)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 300 {
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- GivePlayerMoney(playerid, -300);
- }
- }
- if(listitem == 1)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 50 {
- GivePlayerWeapon(playerid, 46, 1);
- GivePlayerMoney(playerid, -50);
- }
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_AIRCRAFTSHOP)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 500 {
- if AircraftShopVehicle[playerid] != -1 {
- DestroyVehicle(AircraftShopVehicle[playerid]);
- AircraftShopVehicle[playerid] = -1;
- }
- AircraftShopVehicle[playerid] = CreateVehicle(520,1681.7134,-2612.5090,14.2579,2.3501,-1,-1,-1);
- GivePlayerMoney(playerid, -500);
- }
- }
- if(listitem == 1)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 600 {
- if AircraftShopVehicle[playerid] != -1 {
- DestroyVehicle(AircraftShopVehicle[playerid]);
- AircraftShopVehicle[playerid] = -1;
- }
- AircraftShopVehicle[playerid] = CreateVehicle(425,1681.7134,-2612.5090,14.2579,2.3501,-1,-1,-1);
- GivePlayerMoney(playerid, -600);
- }
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_HEAVYWEAPONSSHOP)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 800 {
- GivePlayerWeapon(playerid, 38, 100);
- GivePlayerMoney(playerid, -800);
- }
- }
- if(listitem == 1)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 400 {
- GivePlayerWeapon(playerid, 35, 10);
- GivePlayerMoney(playerid, -400);
- }
- }
- if(listitem == 2)
- {
- new playermoney;
- playermoney = GetPlayerMoney(playerid);
- if playermoney >= 200 {
- GivePlayerWeapon(playerid, 37, 150);
- GivePlayerMoney(playerid, -200);
- }
- }
- }
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment