Dialog Ids getting mixed up with Gamemode & FS.
#4

@Jue Yeh :P I try do it but I wanted to keep this the way it was

@Shadowdog Here it is If theres anything else needed; i will get it too Thanks for trying
OpenHouseDialog stock.
pawn Code:
stock OpenHouseDialog(playerid, houseid)
{
    if(!strcmp(HouseInfo[houseid][Owner], INVALID_OWNER, true)) // the house is for sale
    {
        new string[128];
        if(GetPlayerMoney(playerid) >= HouseInfo[houseid][Price]) format(string, 128, "{33AA33}Buy this house for %d$\n{33AA33}Visit this house", HouseInfo[houseid][Price]);
        else format(string, 128, "{FF0000}Buy this house for %d$\n{33AA33}Visit this house", HouseInfo[houseid][Price]);
       
        ShowPlayerDialog(playerid, DIALOG_FORSALE_HOUSE, DIALOG_STYLE_LIST, "{33AA33}House for sale!", string, "OK", "Close");
        return 1;
    }
    else // not for sale
    {
        new string[128];
        new string2[128];
        new name[24];
        GetPlayerName(playerid, name, 24);
        if(!strcmp(name, HouseInfo[houseid][Owner], true)) // The player is the owner
        {
            ShowPlayerDialog(playerid, DIALOG_MY_HOUSE, DIALOG_STYLE_LIST, "{33AA33}Owned House - Owner: you", "{33AA33}Enter your house\n{33AA33}Open/Close the door\n{33AA33}Sell your house", "OK", "Close");
            return 0;
        }
        else // The player is not the owner
        {
            format(string, 128, "{33AA33}Owned House - Owner: %s", HouseInfo[houseid][Owner]);
            if(HouseInfo[houseid][Locked] == 0) format(string2, 128, "{33AA33}Enter this house");
            else format(string2, 128, "{FF0000}Enter this house");
            ShowPlayerDialog(playerid, DIALOG_OTHERS_HOUSE, DIALOG_STYLE_LIST, string, string2, "OK", "Close");
            return -1;
        }
    }
}
DIALOG_MY_HOUSE in OnDialogResponse.
pawn Code:
case DIALOG_MY_HOUSE:
        {
            if(!response) return 1;
            switch(listitem)
            {
                case 0: // entra
                {
                    EnterHouse(playerid, hID);
                }
                case 1: // apri/chiudi
                {
                    LockUnlockHouse(playerid, hID);
                }
                case 2: // vendi
                {
                    new string[64];
                    format(string, 64, "{33AA33}Do you want to sell your house for %d$?\n{FF0000}All the money, the weapons and the furniture in your storage will remain there, and the next owner can use them.", floatround(HouseInfo[hID][Price]*SELL_MULTIPLIER));
                    ShowPlayerDialog(playerid, DIALOG_SELL_HOUSE, DIALOG_STYLE_MSGBOX, "{FF8000}CONFIRMATION", string, "Sell", "Don't sell");
                }
            }
            return 1;
        }
Thanks again
Reply


Messages In This Thread
Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 02.07.2013, 19:47
Re: Dialog Ids getting mixed up with Gamemode & FS. - by jueix - 02.07.2013, 20:05
Re: Dialog Ids getting mixed up with Gamemode & FS. - by shadowdog - 02.07.2013, 20:06
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 02.07.2013, 20:33
Re: Dialog Ids getting mixed up with Gamemode & FS. - by shadowdog - 02.07.2013, 20:55
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 02.07.2013, 21:12
Re: Dialog Ids getting mixed up with Gamemode & FS. - by shadowdog - 02.07.2013, 21:36
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 02.07.2013, 21:56
Re: Dialog Ids getting mixed up with Gamemode & FS. - by shadowdog - 02.07.2013, 22:38
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 02.07.2013, 22:46
Re: Dialog Ids getting mixed up with Gamemode & FS. - by shadowdog - 03.07.2013, 12:42
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 03.07.2013, 13:43
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 04.07.2013, 13:13
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 05.07.2013, 14:17
Re: Dialog Ids getting mixed up with Gamemode & FS. - by drichie - 05.07.2013, 14:28
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 05.07.2013, 14:36
Respuesta: Re: Dialog Ids getting mixed up with Gamemode & FS. - by Gryphus One - 05.07.2013, 17:30
Re: Respuesta: Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 05.07.2013, 17:45
Respuesta: Dialog Ids getting mixed up with Gamemode & FS. - by Gryphus One - 05.07.2013, 17:58
Re: Respuesta: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 05.07.2013, 18:27
Respuesta: Dialog Ids getting mixed up with Gamemode & FS. - by Gryphus One - 06.07.2013, 16:09
Re: Respuesta: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 06.07.2013, 16:44
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Konstantinos - 06.07.2013, 17:04
Re: Dialog Ids getting mixed up with Gamemode & FS. - by EiresJason - 06.07.2013, 20:27
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 01:47
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Emmet_ - 14.01.2014, 01:53
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 01:59
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 02:05
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Emmet_ - 14.01.2014, 02:07
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 02:10
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 02:14
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 02:21
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Pottus - 14.01.2014, 02:22
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 02:28
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Pottus - 14.01.2014, 02:39
Re: Dialog Ids getting mixed up with Gamemode & FS. - by Swisher - 14.01.2014, 02:40

Forum Jump:


Users browsing this thread: 1 Guest(s)