30.01.2014, 20:34
I am using Explicit rp gamemode
Kick(playerid);
//or
Kick(...?);
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch(dialogid) { case 1: // Gas dialog { switch(response) { case 1: // Selecting { switch(listitem) { case 0: FillGas(playerid,10); case 1: FillGas(playerid,20); case 2: FillGas(playerid,30); case 3: FillGas(playerid,40); case 4: FillGas(playerid,50); case 5: FillGas(playerid,60); case 6: FillGas(playerid,70); case 7: FillGas(playerid,80); case 8: FillGas(playerid,90); case 9: FillGas(playerid,100); } } } } case 2: // Gun Shop { switch(response) { case 0: // Using cancel { new rand = random(2)+1; // AI switch(rand) { case 1: PlayAudioStreamForPlayerEx(playerid, "http://pr-gta.com/pr-rp-soundeffects/gunshop/Cancel1.mp3"); default: PlayAudioStreamForPlayerEx(playerid, "http://pr-gta.com/pr-rp-soundeffects/gunshop/Cancel2.mp3"); } SetPVarInt(playerid, "OCC", 0); SetCameraBehindPlayer(playerid); } case 1: // Selecting { new string[256], gunname[20]; switch(listitem) { case 0: { for(new h = 0; h < sizeof(GunShopMenu); h++) { GetWeaponName(GunShopMenu[h][0], gunname, sizeof(gunname)); if(h == 0) { format(string, sizeof(string),"%s - $%d - TLS: %d", gunname, GunShopMenu[h][1], GunShopMenu[h][2]); } else { format(string, sizeof(string),"%s\n%s - $%d - TLS: %d", string, gunname, GunShopMenu[h][1], GunShopMenu[h][2]); } } ShowPlayerDialog(playerid,52,DIALOG_STYLE_LIST,"Gun Shop - Buy Weapon",string,"Purchase", "Exit"); } case 1: { switch(GetPlayerWeapon(playerid)) { case 22, 23, 24, 25, 26, 33: { if(GetPlayerMoneyEx(playerid) >= 2500) { if(PlayerWeapons[playerid][GetPlayerWeapon(playerid)] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: The weapon you currently have in your hand is labeld a Hacked Weapon, You are either SA-MP Bugged or Cheating."); GetWeaponName(GetPlayerWeapon(playerid), gunname, sizeof(gunname)); format(string, sizeof(string),"%s Ammo", gunname); PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-2500); GameTextForPlayer(playerid, "~r~-$2500.", 5000, 1); format(string, sizeof(string),"%s purchased for $2500.",string); SendClientMessage(playerid, COLOR_WHITE, string); new ammo = 0, gunid = GetPlayerWeapon(playerid); switch(GetPlayerWeapon(playerid)) { case 22, 23: ammo=50; case 24: ammo=40; case 25: ammo=30; case 26: ammo=35; case 33: ammo=25; } RemovePlayerWeaponEx(playerid, GetPlayerWeapon(playerid)); GivePlayerWeaponEx(playerid, gunid,ammo); ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Gun Shop",GUNSHOP_DIALOG,"Purchase", "Exit"); } else SendEnough(playerid,"dollars", 2500, GetPlayerMoneyEx(playerid)); } default: SendClientMessage(playerid, COLOR_WHITE, "You do not have a valid weapon to re-fill."), ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Gun Shop",GUNSHOP_DIALOG,"Purchase", "Exit"); } } case 2: { if(GetPlayerMoneyEx(playerid) >= 2000) { PlayerPlaySound(playerid,1150, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-2000); SetPlayerArmourEx(playerid,30.0); GameTextForPlayer(playerid, "~r~-$2000.", 5000, 1); SendClientMessage(playerid,COLOR_WHITE,"Kevlar purchased for $2000."); ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Gun Shop",GUNSHOP_DIALOG,"Purchase", "Exit"); } else { SendEnough(playerid,"dollars", 100, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } } } } } case 3: // Rentable Dialog { switch(response) { case 0: // Using cancel { RemovePlayerFromVehicleEx(playerid); } case 1: // Selecting { foreach (Player,i) { if(GetPVarInt(i, "RentKey") == GetPlayerVehicleID(playerid)) { SendClientMessage(playerid, COLOR_GREY, "Someone already rents this vehicle."); RemovePlayerFromVehicleEx(playerid); return 1; } } if(GetPVarInt(playerid, "DonateRank") == 0) { new price = 500; if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 462) { price = 400; } if(GetPlayerMoneyEx(playerid) >= price) { GivePlayerMoneyEx(playerid,-price); SetPVarInt(playerid, "RentKey", GetPlayerVehicleID(playerid)); SendClientMessage(playerid, COLOR_WHITE, "If you want to disgard the rentable remember to use /unrent."); PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0); if(!IsNotAEngineCar(GetPlayerVehicleID(playerid))) { ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Vehicle Options","{33FF66}Toggle Engine\n{33FF66}Idle\n{33FF66}Lights\n{33FF66}Exit Vehicle","Continue", "Cancel"); CarLights(GetPlayerVehicleID(playerid),2); } } else { SendEnough(playerid,"dollars", price, GetPlayerMoneyEx(playerid)); RemovePlayerFromVehicleEx(playerid); } } else { SetPVarInt(playerid, "RentKey", GetPlayerVehicleID(playerid)); VehicleInfo[GetPlayerVehicleID(playerid)][vEngine] = 1; CarEngine(GetPlayerVehicleID(playerid),1); CarLights(GetPlayerVehicleID(playerid),1); SendClientMessage(playerid, COLOR_WHITE, "If you want to disgard the rentable remember to use /unrent."); PlayerPlaySound(playerid, 1054, 0.0, 0.0, 0.0); } } } } case 4: // Vehicle option dialog { switch(response) { case 1: // Selecting { switch(listitem) { case 0: // Toggle engine { if(VehicleInfo[GetPlayerVehicleID(playerid)][vFuel] == 0) { TogglePlayerControllableEx(playerid,false); return SendClientMessage(playerid,COLOR_LIGHTRED,"There is no more fuel in your vehicle."); } if(VehicleInfo[GetPlayerVehicleID(playerid)][vWireTime] > 0) { RemovePlayerFromVehicleEx(playerid); return SendClientMessage(playerid,COLOR_LIGHTRED,"You must wait for the vehicle's hotwiring delay to complete !"); } new Float:ghealth, health; GetVehicleHealth(GetPlayerVehicleID(playerid),ghealth); health = floatround(ghealth); if(health <= 300) { RemovePlayerFromVehicleEx(playerid); return SendClientMessage(playerid,COLOR_LIGHTRED,"The vehicle is currently damaged !"); } new string[128],sendername[MAX_PLAYER_NAME]; format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid)); GiveNameSpace(sendername); switch(VehicleInfo[GetPlayerVehicleID(playerid)][vEngine]) { case 0: { format(string, sizeof(string), "Attempting to start the %ss engine.", VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); SendClientMessage(playerid, COLOR_WHITE, string); new RandomStart; RandomStart = random(4); switch(RandomStart) { case 0,1,2: { VehicleInfo[GetPlayerVehicleID(playerid)][vEngine] = 1; CarEngine(GetPlayerVehicleID(playerid),1); TogglePlayerControllableEx(playerid,true); format(string, sizeof(string), "%ss engine turned [ON]", VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); SendClientMessage(playerid, COLOR_WHITE, string); CarLights(GetPlayerVehicleID(playerid),1); new key = VehicleInfo[GetPlayerVehicleID(playerid)][vOwned]; if(key != SCRIPT_CARS) { if(CarInfo[key][cBomb] == 1) { new Float:X, Float:Y, Float:Z, vehicleid = GetPlayerVehicleID(playerid); GetVehiclePos(vehicleid, X, Y, Z); SetVehicleVelocity(vehicleid, 0, 0, 0.2); SendFactionMessage(4, COLOR_PINK, "HQ: All Units - HQ: Vehicle explosion."); format(string, sizeof(string), "HQ: Location: %s", GetZone(X, Y, Z)); SendFactionMessage(4, COLOR_PINK, string); CreateFire(X, Y, Z, 0, 0); CreateExplosion(X, Y, Z, 12, 15.0); CreateExplosion(X, Y, Z, 12, 15.0); foreach (Player,i) { if(GetPVarInt(i, "PlayerLogged") == 1 && GetPlayerVehicleID(i) == vehicleid) { SetPlayerPos(i, X, Y, Z+0.5); SetPlayerHealth(i,1.0); SetPlayerHealth(i,0.0); } } SetVehicleHealth(vehicleid, 15.0); CarInfo[key][cBomb]=0; CarInfo[key][cHealth]=15.0; SaveCars(); SaveCars2(); } } } case 3: { format(string, sizeof(string), "The attempt to start the %ss engine has failed !", VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); SendClientMessage(playerid, COLOR_WHITE, string); ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Vehicle Options","{33FF66}Toggle Engine\n{33FF66}Idle\n{33FF66}Lights\n{33FF66}Exit Vehicle","Continue", "Cancel"); } } } case 1: { VehicleInfo[GetPlayerVehicleID(playerid)][vEngine] = 0; CarEngine(GetPlayerVehicleID(playerid),0); ShowPlayerDialog(playerid,4,DIALOG_STYLE_LIST,"Vehicle Options","{33FF66}Toggle Engine\n{33FF66}Idle\n{33FF66}Lights\n{33FF66}Exit Vehicle","Continue", "Cancel"); format(string, sizeof(string), "%ss engine turned [OFF]", VehicleName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); SendClientMessage(playerid, COLOR_WHITE, string); CarLights(GetPlayerVehicleID(playerid),2); } } } case 1: // IDLE { new Float:health; GetVehicleHealth(GetPlayerVehicleID(playerid),health); if(health < 300.0) return SendClientMessage(playerid,COLOR_WHITE,"You can't idle in a damaged vehicle."); if(VehicleInfo[GetPlayerVehicleID(playerid)][vFuel] == 0) { TogglePlayerControllableEx(playerid,false); return SendClientMessage(playerid,COLOR_LIGHTRED,"There is no more fuel in the vehicle !"); } if(VehicleInfo[GetPlayerVehicleID(playerid)][vEngine] == 0) SendClientMessage(playerid,COLOR_WHITE,"You are now idle inside your vehicle, remember to use /vehicle."); else SendClientMessage(playerid,COLOR_WHITE,"Your engine needs to be off to use this option."); } case 2: // Lights { if(VehicleInfo[GetPlayerVehicleID(playerid)][vFuel] == 0) { TogglePlayerControllableEx(playerid,false); return SendClientMessage(playerid,COLOR_LIGHTRED,"There is no more fuel in the vehicle !"); } if(VehicleInfo[GetPlayerVehicleID(playerid)][vEngine] == 0) { SendClientMessage(playerid,COLOR_WHITE,"This vehicle's engine is off."); return TogglePlayerControllableEx(playerid,false); } switch(VehicleInfo[GetPlayerVehicleID(playerid)][vLights]) { case 1: { CarLights(GetPlayerVehicleID(playerid),2); GameTextForPlayer(playerid, "~w~Lights~n~~r~Off", 4000, 3); } case 2: { CarLights(GetPlayerVehicleID(playerid),1); GameTextForPlayer(playerid, "~w~Lights~n~~g~On", 4000, 3); } } } case 3: // Exit Car { SendClientMessage(playerid,COLOR_WHITE,"You left the vehicle."); TogglePlayerControllableEx(playerid,true); RemovePlayerFromVehicleEx(playerid); } } } } } case 5: // Store dialog { switch(response) { case 0: // Using cancel { SendClientMessage(playerid,COLOR_FADE,"24/7 Cashier Says: Thank you, come again."); // AI SetPVarInt(playerid, "OCC", 0); } case 1: // Selecting { switch(listitem) { case 0: // Sprunk bottle $3 { if(GetPlayerMoneyEx(playerid) >= 3) { PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-3); SendClientMessage(playerid,COLOR_WHITE,"Sprunk bottle purchased."); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DRINK_SPRUNK); SetPlayerHealthEx(playerid,99.0); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 3); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 150, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 1: // Dice $200 { if(GetPlayerMoneyEx(playerid) >= 200) { if(GetPVarInt(playerid, "Dice") == 1) return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-200); SendClientMessage(playerid,COLOR_WHITE,"Dice purchased ((/dice))."); SetPVarInt(playerid, "Dice", 1); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7", STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 200); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 200, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 2: // Mask 1000$ { if(GetPlayerMoneyEx(playerid) >= 1000) { if(GetPVarInt(playerid, "ConnectTime") >= 56) { if(GetPVarInt(playerid, "Mask") == 1) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); } PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-1000); SendClientMessage(playerid,COLOR_WHITE,"Mask purchased ((/mask))."); SetPVarInt(playerid, "Mask", 1); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 1000); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"Time-In-LS", 56, GetPVarInt(playerid, "ConnectTime")); SetPVarInt(playerid, "OCC", 0); } } else { SendEnough(playerid,"dollars", 1000, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 3: // Walkie Talkie 1000$ { if(GetPlayerMoneyEx(playerid) >= 1000) { if(GetPVarInt(playerid, "WalkieTalkie") == 1) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); } PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-1000); SendClientMessage(playerid,COLOR_WHITE,"Walkie Talkie purchased ((/wt, /setfreq))."); SetPVarInt(playerid, "WalkieTalkie", 1); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 1000); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 1000, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 4: // Bag 500$ { if(GetPlayerMoneyEx(playerid) >= 500) { if(GetPVarInt(playerid, "Bag") == 1) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); } PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-500); SendClientMessage(playerid,COLOR_WHITE,"Bag purchased, you can now hold more items."); SetPVarInt(playerid, "Bag", 1); SetPlayerAttachedObject(playerid, HOLDOBJECT_BAG, 371, 1, 0.0, -0.1, 0.0, 0.0, 90.0, 0.0); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 500); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 500, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 5: // Cigarette's 150$ { if(GetPlayerMoneyEx(playerid) >= 150) { if(GetPVarInt(playerid, "Cigs") == 20) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); } if(GetPVarInt(playerid, "Age") < 18) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_WHITE,"Must be 18 and over to purchase cigarettes."); } PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-150); SendClientMessage(playerid,COLOR_WHITE,"Cigarette's purchased, you can now use /smokecig."); SetPVarInt(playerid, "Cigs", 20); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 150); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 150, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 6: // Lighter fluid 110$ { if(GetPlayerMoneyEx(playerid) >= 110) { if(GetPVarInt(playerid, "Lighter") == 1) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); } PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-110); SendClientMessage(playerid,COLOR_WHITE,"Lighter fluid purchased."); SetPVarInt(playerid, "Lighter", 10); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 110); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 110, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 7: // Spraycan $300 { if(GetPlayerMoneyEx(playerid) >= 300) { PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); if(GetPVarInt(playerid, "Member") >= 8) { if(FactionInfo[GetPVarInt(playerid, "Member")][fTagging] >= 18659 && FactionInfo[GetPVarInt(playerid, "Member")][fTagging] <= 18667) GivePlayerWeaponEx(playerid,41,9999999); else GivePlayerWeaponEx(playerid,41,350); } else GivePlayerWeaponEx(playerid,41,350); GivePlayerMoneyEx(playerid,-300); SendClientMessage(playerid,COLOR_WHITE,"Spraycan purchased."); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 300); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 300, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 8: //Gas Can $120 { if(GetPlayerMoneyEx(playerid) >= 120) { if(GetPVarInt(playerid, "GasCan") == 1) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: You already have this item."); } PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-120); SetPVarInt(playerid, "GasCan", 1); SendClientMessage(playerid,COLOR_WHITE,"Gas Can purchased ((/gascan))."); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 120); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 120, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 9: // Camera $300 { if(GetPlayerMoneyEx(playerid) >= 300) { PlayerPlaySound(playerid,1054, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-300); GivePlayerWeaponEx(playerid,43,99999); SendClientMessage(playerid,COLOR_WHITE,"Camera purchased."); ShowPlayerDialog(playerid,5,DIALOG_STYLE_LIST,"24/7",STORE_DIALOG, "Purchase", "Exit"); if(GetPVarInt(playerid, "ConnectTime") >= 8) BizzTill(GetPVarInt(playerid, "BizzEnter"), 300); BizzProduct(GetPVarInt(playerid, "BizzEnter")); } else { SendEnough(playerid,"dollars", 300, GetPlayerMoneyEx(playerid)); SetPVarInt(playerid, "OCC", 0); } } case 10: ShowPlayerDialog(playerid,63,DIALOG_STYLE_LIST,"24/7",STORE2_DIALOG, "Purchase", "Exit"); } } } } case 7: // Combine dialog { new string[128]; switch(response) { case 1: // Selecting { new amount = GetPVarInt(playerid, "Cocaine") / 2 * 1; if(DrugLimit(playerid,1,amount)) { format(string, sizeof(string),"%d grams of crack created !",amount); SendClientMessage(playerid, COLOR_WHITE, string); SetPVarInt(playerid, "BakeSoda", 0); SetPVarInt(playerid, "Crack", GetPVarInt(playerid, "Crack")+amount); SetPVarInt(playerid, "Cocaine", 0); } else { format(string, sizeof(string), "You cannot hold this amount of crack grams in your hand, can only hold %d more grams.", DrugLimitLeft(playerid,2)); SendClientMessage(playerid, COLOR_WHITE, string); } } } } case 8: // Bank Account dialog { switch(response) { case 0: // Using cancel { SetPVarInt(playerid, "OCC", 0); } case 1: // Selecting { switch(listitem) { case 0: SendBankDialog(playerid, 1); case 1: SendBankDialog(playerid, 2); case 2: { if(GetPVarInt(playerid, "CheckEarn") <= 0) { SetPVarInt(playerid, "OCC", 0); return SendClientMessage(playerid,COLOR_WHITE,"You have no checks to cash."); } new string[128],sendername[MAX_PLAYER_NAME]; format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid)); GiveNameSpace(sendername); format(string, sizeof(string), "* Bank Clerk hands the $%d to %s.", GetPVarInt(playerid, "CheckEarn"), sendername); SendClientMessage(playerid,COLOR_PURPLE,string); GivePlayerMoneyEx(playerid,GetPVarInt(playerid, "CheckEarn")); DeletePVar(playerid,"CheckEarn"); SetPVarInt(playerid, "OCC", 0); OnPlayerDataSave(playerid); } } } } } case 9: // Bank Deposit dialog { new string[128]; switch(response) { case 0: { format(string, sizeof(string), "Bank Account: $%d", GetPVarInt(playerid, "Bank")); ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,string,"{33FF66}Deposit\n{33FF66}Withdraw", "Continue", "Exit"); } case 1: { if(!strlen(inputtext)) return SendBankDialog(playerid, 1); if(strlen(inputtext) >= 7) return SendBankDialog(playerid, 1); new amount = strval(inputtext); if(amount <= 0) return SendBankDialog(playerid, 1); if(amount >= 99999999) return SendBankDialog(playerid, 1); if(GetPlayerMoneyEx(playerid) >= amount) { PlayerPlaySound(playerid,1055, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,-amount); new current = GetPVarInt(playerid, "Bank"); SetPVarInt(playerid, "Bank", amount+GetPVarInt(playerid, "Bank")); SendClientMessage(playerid, COLOR_GREEN," "); SendClientMessage(playerid,COLOR_WHITE,":Bank Statement:"); format(string, sizeof(string), "Deposit: $%d", amount); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "Old Balance: $%d", current); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "New Balance: $%d", GetPVarInt(playerid, "Bank")); SendClientMessage(playerid, COLOR_GREEN, string); SetPVarInt(playerid, "OCC", 0); } else SendEnough(playerid,"dollars", amount, GetPlayerMoneyEx(playerid)), SendBankDialog(playerid, 1); } } } case 10: // Bank Withdraw dialog { new string[128]; switch(response) { case 0: { format(string, sizeof(string), "Bank Account: $%d", GetPVarInt(playerid, "Bank")); ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,string,"{33FF66}Deposit\n{33FF66}Withdraw", "Continue", "Exit"); } case 1: { if(!strlen(inputtext)) return SendBankDialog(playerid, 2); if(strlen(inputtext) >= 7) return SendBankDialog(playerid, 2); new amount = strval(inputtext); if(amount <= 0) return SendBankDialog(playerid, 2); if(amount >= 99999999) return SendBankDialog(playerid, 2); if(GetPVarInt(playerid, "Bank") >= amount) { PlayerPlaySound(playerid,1055, 0.0, 0.0, 0.0); GivePlayerMoneyEx(playerid,amount); new current = GetPVarInt(playerid, "Bank"); SetPVarInt(playerid, "Bank", GetPVarInt(playerid, "Bank")-amount); SendClientMessage(playerid, COLOR_GREEN," "); SendClientMessage(playerid,COLOR_WHITE,":Bank Statement:"); format(string, sizeof(string), "Withdraw: $%d", amount); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "Old Balance: $%d", current); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string), "New Balance: $%d", GetPVarInt(playerid, "Bank")); SendClientMessage(playerid, COLOR_GREEN, string); SetPVarInt(playerid, "OCC", 0); } else SendEnough(playerid,"dollars", amount, GetPlayerMoneyEx(playerid)), SendBankDialog(playerid, 2); } } } case 11: // Bar Menu dialog { switch(response) { case 0: // Using cancel { SetPVarInt(playerid, "OCC", 0); } case 1: // Selecting { switch(listitem) { case 0: BarPurchase(playerid,5,SPECIAL_ACTION_DRINK_SPRUNK,"Water"); case 1: BarPurchase(playerid,7,SPECIAL_ACTION_DRINK_SPRUNK,"Sprite"); case 2: BarPurchase(playerid,10,SPECIAL_ACTION_DRINK_WINE,"Budweiser"); case 3: BarPurchase(playerid,20,SPECIAL_ACTION_DRINK_WINE,"Champagne"); case 4: BarPurchase(playerid,15,SPECIAL_ACTION_DRINK_BEER,"Vodka"); case 5: BarPurchase(playerid,13,SPECIAL_ACTION_DRINK_BEER,"Cidre"); } } } } case 12: // Restaurant Menu dialog { switch(response) { case 0: // Using cancel { SetPVarInt(playerid, "OCC", 0); } case 1: // Selecting { switch(listitem) { case 0: RestPurchase(playerid,5,20.0,"Soup"); case 1: RestPurchase(playerid,10,30.0,"Sandwich"); case 2: RestPurchase(playerid,20,40.0,"Roast Beef"); case 3: RestPurchase(playerid,20,40.0,"Steak"); } } } } case 26: // LSPD Armoury Shop { switch(response) { case 0: // Using cancel { SetPVarInt(playerid, "OCC", 0); } case 1: // Selecting { switch(listitem) { case 0: BuyLSPDWeapon(playerid,3,"Nightstick"); case 1: BuyLSPDWeapon(playerid,41,"Pepper Spray"); case 2: BuyLSPDWeapon(playerid,22,"Colt 45"); case 3: BuyLSPDWeapon(playerid,24,"Desert Eagle"); case 4: BuyLSPDWeapon(playerid,25,"Shotgun"); case 5: BuyLSPDWeapon(playerid,34,"Sniper Rifle"); case 6: BuyLSPDWeapon(playerid,29,"MP5"); case 7: BuyLSPDWeapon(playerid,31,"M4A1"); case 8: BuyLSPDWeapon(playerid,43,"Camera"); case 9: BuyLSPDWeapon(playerid,17,"Smoke Grenade"); case 10: {