House system problem
#1

Hi guys,
i have one house system....
the dialogue is overwhelmed.....

I'll pick up the pickup to show me the dialogue and there it is House Bank, Skin, Weapons and Intelier.
And when I click, for example, on the skin that I want to save it in the house, it will return me to the menu

Testing:
GM grandlarc
FS HOuse

Help me guys
Reply
#2

Send the ondialogueresponse in that.
Reply
#3

OnPlayerPickup:
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(-
GetPlayerHouse(playerid))
    {
        
SendClientMessage(playerid,-1,"Stlač {FF0000}ľavэ alt{FFFFFF} pre zobrazenie dialуgu !");
    }
    if(
InHouse[playerid] != -1)
    {
        if(
HouseInfo[InHouse[playerid]][Break] && !IsPlayerHouseOwner(playerid,InHouse[playerid]))
        {
            
ShowPlayerDialog(playerid,HOUSE_STEAL,DIALOG_STYLE_MSGBOX,"House Steal","Naozaj sa chceљ pokъsiť ukradnъť peniaze z domбceho trezoru ?","Enter","Koniec");
        }
        
SetPVarInt(playerid"HouseID"InHouse[playerid]);
        
ShowPlayerDialog(playerid,INVENTORY_MENU,DIALOG_STYLE_LIST,"House Inventory","Uloћenй Peniaze\nOblečenie\nZbrane\nNastaviť/Zmeniť Heslo\nOchrannй prvky\nInteriйr\nNastaviť spawn","Enter","Koniec");
    }
    return 
1;

Ondialogueresponse:

PHP код:
case INVENTORY_MENU:
        {
            if(
response)
            {
                if(
listitem == 0)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"Tento dom nieje tvoj!");
                    
ShowPlayerDialog(playerid,INVENTORY_BANK,DIALOG_STYLE_LIST,"House Bank","Vybrať Peniaze\nUloћiť Peniaze\nZostatok","Enter","Koniec");
                }
                 if(
listitem == 1)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"Tento dom nieje tvoj!");
                    new 
String1[256],String2[100];
                    for(new 
iMAX_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");
                }
                if(
listitem == 2)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"Tento dom nieje tvoj!");
                    new 
String1[256],String2[100];
                    for(new 
iMAX_WEAPON_SLOT;i++)
                    {
                        if(
HouseInfo[houseid][Weapon][i] == 0)
                        {
                            
format(String2,100,"- Ћiadna Zbraň -\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");
                }
                if(
listitem == 3)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"Tento dom nieje tvoj!");
                    
ShowPlayerDialog(playerid,PASS_SET,1,"House Password","Nastav heslo domu !","Enter","Koniec");
                }
                if(
listitem == 4)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"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");
                }
                if(
listitem == 5)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"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");
                }
                if(
listitem == 6)
                {
                    if(!
IsPlayerHouseOwner(playerid,houseid)) return SendClientMessage(playerid0xFFFFFFFF"Tento dom nieje tvoj!");
                    if(
SetSpawn[playerid] == -1)
                    {
                        
SetSpawn[playerid] = houseid;
                        
SendClientMessage(playerid0xFFFFFFFF"Odteraz sa budeљ {0000FF}spawnovať{FFFFFF} vo svojom {FF0000}dome{FFFFFF}!");
                        }else{
                        
SetSpawn[playerid] = -1;
                        
SendClientMessage(playerid0xFFFFFFFF"Odteraz sa budeљ {0000FF}nespawnovať{FFFFFF} vo svojom {FF0000}dome{FFFFFF}!");
                    }
                }
            }
        } 
My script is language Slovak
Reply
#4

No, show me the case of the dialogue that returns you to the menu after choosing the skin.
Reply
#5

VIDEO

Problem here video.

Quote:

No, show me the case of the dialogue that returns you to the menu after choosing the skin.

Reply
#6

It is caused by player 'picking up' the pickup again. A way to solve this would be creating a variable to keep track if player is actually in the menu. If player tries to pick up the pickup and the variable has been set to 'inside pickup' then ignore the pickup code. Once they leave it, you could reset it or perhaps have a timer?
Reply
#7

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}!");
                    }
                }
            }
        }
Reply
#8

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
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}!");
                    }
                }
            }
        }
It works, but the problem is that when I call again the pickup so the dialogue does not show at all
Reply
#9

help me guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)