19.12.2017, 19:41
Try this:
Код:
new IsViewingHouseMenu[MAX_PLAYERS]; public OnPlayerPickUpPickup(playerid, pickupid) { if(-1 > GetPlayerHouse(playerid)) { SendClientMessage(playerid,-1,"Stlac {FF0000}lavэ alt{FFFFFF} pre zobrazenie dialуgu !"); } if(InHouse[playerid] != -1) { if(IsViewingHouseMenu[playerid] == 0) { if(HouseInfo[InHouse[playerid]][Break] && !IsPlayerHouseOwner(playerid,InHouse[playerid])) { ShowPlayerDialog(playerid,HOUSE_STEAL,DIALOG_STYLE_MSGBOX,"House Steal","Naozaj sa chceš pokъsit ukradnъt peniaze z domбceho trezoru ?","Enter","Koniec"); } SetPVarInt(playerid, "HouseID", InHouse[playerid]); ShowPlayerDialog(playerid,INVENTORY_MENU,DIALOG_STYLE_LIST,"House Inventory","Uloženй Peniaze\nOblecenie\nZbrane\nNastavit/Zmenit Heslo\nOchrannй prvky\nInteriйr\nNastavit spawn","Enter","Koniec"); } } return 1; } case INVENTORY_MENU: { if(response) { if(listitem == 0) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); ShowPlayerDialog(playerid,INVENTORY_BANK,DIALOG_STYLE_LIST,"House Bank","Vybrat Peniaze\nUložit Peniaze\nZostatok","Enter","Koniec"); IsViewingHouseMenu[playerid] = 1; } if(listitem == 1) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); new String1[256],String2[100]; for(new i; i < MAX_SKIN_SLOT;i++) { if(HouseInfo[houseid][Skins][i] == -1) { format(String2,100,"- Žiadny Skin -\n"); } else { format(String2,100,"Skin {00FF00}%d{FFFFFF}\n",HouseInfo[houseid][Skins][i]); } format(String1,256,"{FFFFFF}%s%s",String1,String2); } ShowPlayerDialog(playerid,INVENTORY_SKINS,DIALOG_STYLE_LIST,"House Skins",String1,"Enter","Koniec"); IsViewingHouseMenu[playerid] = 1; } if(listitem == 2) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); new String1[256],String2[100]; for(new i; i < MAX_WEAPON_SLOT;i++) { if(HouseInfo[houseid][Weapon][i] == 0) { format(String2,100,"- Žiadna Zbran -\n"); } else { format(String2,100,"%s ({00FF00}%d{FFFFFF})\n",WeaponName(HouseInfo[houseid][Weapon][i]),HouseInfo[houseid][Ammo][i]); } format(String1,256,"{FFFFFF}%s%s",String1,String2); } ShowPlayerDialog(playerid,INVENTORY_WEAPONS,DIALOG_STYLE_LIST,"House Weapons",String1,"Enter","Koniec"); IsViewingHouseMenu[playerid] = 1; } if(listitem == 3) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); ShowPlayerDialog(playerid,PASS_SET,1,"House Password","Nastav heslo domu !","Enter","Koniec"); IsViewingHouseMenu[playerid] = 1; } if(listitem == 4) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); ShowPlayerDialog(playerid,HOUSE_SECURITY,DIALOG_STYLE_LIST,"House Interior","{FFFFFF}Camera\t\t\t\t{FF0000}$25 000\n{FFFFFF}Pes\t\t\t\t{FF0000}$50 000\n{FFFFFF}Termo Senzory\t\t\t{FF0000}$100 000\n{FFFFFF}Senzory Pohybu\t\t{FF0000}$250 000\n{FFFFFF}Nepriestrelne dvere\t\t{FF0000}$500 000","Enter","Koniec"); IsViewingHouseMenu[playerid] = 1; } if(listitem == 5) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); ShowPlayerDialog(playerid,INTERIOR_SELECT,DIALOG_STYLE_LIST,"House Interior","{FFFFFF}1. Malэ \t\t\t$50 000\n2. Malэ\t\t\t$100 000\n3. Malэ\t\t\t$150 000\n4. Strednэ\t\t$200 000\n5. Strednэ\t\t$250 000\n6. Strednэ\t\t$300 000\n7. Luxusnэ\t\t$450 000\n8. Luxusnэ\t\t$550 000\n9. Luxusnэ\t\t$750 000\n10. Luxusnэ\t\t$899 000\n11. Luxusnэ\t\t$950 000\n12. Luxusnэ\t\t$1 000 000","Enter","Koniec"); IsViewingHouseMenu[playerid] = 1; } if(listitem == 6) { if(!IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid, 0xFFFFFFFF, "Tento dom nieje tvoj!"); if(SetSpawn[playerid] == -1) { SetSpawn[playerid] = houseid; SendClientMessage(playerid, 0xFFFFFFFF, "Odteraz sa budeš {0000FF}spawnovat{FFFFFF} vo svojom {FF0000}dome{FFFFFF}!"); }else{ SetSpawn[playerid] = -1; SendClientMessage(playerid, 0xFFFFFFFF, "Odteraz sa budeš {0000FF}nespawnovat{FFFFFF} vo svojom {FF0000}dome{FFFFFF}!"); } } } }