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

Hi everyone.

I am having an issue implementing a filterscript. The FS is by [GF]Sasino97 and it's his Sasinosoft Houses 2.2 FS in this case.
Link:http://forum.sa-mp.com/showthread.ph...ighlight=House

I have no problem getting the FS to actually work. Everything is perfect besides one thing. My dialog ids get mixed or something with his.

By this I mean that when I enter a house; It forces my 'login' dialog to appear and so I have to log in again. When I log in again; I then respawn as if I was logging in for the first time today. Also; if I click 'Close' on the dialog; it will kick me. This is because my 'login' dialog has 'Quit' which kicks the player if they press it and I am assuming it's that.

I made a short video of the problem. Please help if you can. I have spent hours trying to solve this but I couldn't

Thanks to anyone who can help!

http://www.youtube.com/watch?v=JDh5l...ature=*********

Here are my dialogs & also Sasino's dialogs.

Mine
pawn Code:
//Dialogs.
#define DIALOG_CLICKEDREG       220
#define DIALOG_CLICKEDLOGIN     221
#define DIALOG_REGISTER         222
#define DIALOG_GENDER           223
#define DIALOG_RACE             224
#define DIALOG_ARRIVAL          225
#define DIALOG_AGE              226
#define DIALOG_RELOGMSG         227
#define DIALOG_LOGIN            228
#define DIALOG_SUCCESS_1        229
#define DIALOG_SUCCESS_2        230
#define DIALOG_QUESTION1        231
#define DIALOG_QUESTION2        232
#define DIALOG_QUESTION3        233
#define DIALOG_QUESTION4        234
#define DIALOG_QUESTION5        235
#define DIALOG_QUESTION6        236
#define DIALOG_QUESTION7        237
#define DIALOG_QUESTION8        238

#define DIALOG_GOTOLOC          239

#define DIALOG_IDLEGASBUY       240
#define DIALOG_IDLESTACKEAT     241
#define DIALOG_MARINABURGEREAT  242
#define DIALOG_JEFFERSONS24/7BUY   243

#define DIALOG_VEHICLEBUY           244
#define DIALOG_VEHICLEBUY2DOOR      245
#define DIALOG_VEHICLEBUY4DOOR      246
#define DIALOG_VEHICLEBUYLOWRIDER   247
#define DIALOG_VEHICLEBUY4BY4       248
#define DIALOG_VEHICLEBUYSALOON     249

#define DIALOG_IDBUY                250
#define DIALOG_LICENSEBUY           251
Sasino's.
pawn Code:
// Dialogs
#define DIALOG_FORSALE_HOUSE 470 //
#define DIALOG_MY_HOUSE 471 //
#define DIALOG_OTHERS_HOUSE 472 //
#define DIALOG_FORSALE_BIZ 473 //
#define DIALOG_MY_BIZ 474 //
#define DIALOG_OTHERS_BIZ 475 //
#define DIALOG_HOUSE_MENU 476 //
#define DIALOG_SELL_HOUSE 477 //
#define DIALOG_RENAME_SHOP 478 //
#define DIALOG_SELL_SHOP 479 //
#define DIALOG_SUPPLY 480 //
#define DIALOG_STORE_MONEY 481 //
#define DIALOG_WITHDRAW_MONEY 482 //
#define DIALOG_EDIT_FURNITURE 483 //
#define DIALOG_SELL_FURNITURE 484 //
#define DIALOG_BUY_FURNITURE 485 //
#define DIALOG_MOVE_FURNITURE 486 //
#define DIALOG_FURNITURE_BOUGHT 487 //
#define DIALOG_SHOP 488 //
#define DIALOG_SHOP_MENU 489 //
Again; thanks to anyone who can even remotely help
Reply
#2

Quote:
Originally Posted by EiresJason
View Post
Hi everyone.

I am having an issue implementing a filterscript. The FS is by [GF]Sasino97 and it's his Sasinosoft Houses 2.2 FS in this case.
Link:http://forum.sa-mp.com/showthread.ph...ighlight=House

I have no problem getting the FS to actually work. Everything is perfect besides one thing. My dialog ids get mixed or something with his.

By this I mean that when I enter a house; It forces my 'login' dialog to appear and so I have to log in again. When I log in again; I then respawn as if I was logging in for the first time today. Also; if I click 'Close' on the dialog; it will kick me. This is because my 'login' dialog has 'Quit' which kicks the player if they press it and I am assuming it's that.

I made a short video of the problem. Please help if you can. I have spent hours trying to solve this but I couldn't

Thanks to anyone who can help!

http://www.youtube.com/watch?v=JDh5l...ature=*********

Here are my dialogs & also Sasino's dialogs.

Mine
pawn Code:
//Dialogs.
#define DIALOG_CLICKEDREG       220
#define DIALOG_CLICKEDLOGIN     221
#define DIALOG_REGISTER         222
#define DIALOG_GENDER           223
#define DIALOG_RACE             224
#define DIALOG_ARRIVAL          225
#define DIALOG_AGE              226
#define DIALOG_RELOGMSG         227
#define DIALOG_LOGIN            228
#define DIALOG_SUCCESS_1        229
#define DIALOG_SUCCESS_2        230
#define DIALOG_QUESTION1        231
#define DIALOG_QUESTION2        232
#define DIALOG_QUESTION3        233
#define DIALOG_QUESTION4        234
#define DIALOG_QUESTION5        235
#define DIALOG_QUESTION6        236
#define DIALOG_QUESTION7        237
#define DIALOG_QUESTION8        238

#define DIALOG_GOTOLOC          239

#define DIALOG_IDLEGASBUY       240
#define DIALOG_IDLESTACKEAT     241
#define DIALOG_MARINABURGEREAT  242
#define DIALOG_JEFFERSONS24/7BUY   243

#define DIALOG_VEHICLEBUY           244
#define DIALOG_VEHICLEBUY2DOOR      245
#define DIALOG_VEHICLEBUY4DOOR      246
#define DIALOG_VEHICLEBUYLOWRIDER   247
#define DIALOG_VEHICLEBUY4BY4       248
#define DIALOG_VEHICLEBUYSALOON     249

#define DIALOG_IDBUY                250
#define DIALOG_LICENSEBUY           251
Sasino's.
pawn Code:
// Dialogs
#define DIALOG_FORSALE_HOUSE 470 //
#define DIALOG_MY_HOUSE 471 //
#define DIALOG_OTHERS_HOUSE 472 //
#define DIALOG_FORSALE_BIZ 473 //
#define DIALOG_MY_BIZ 474 //
#define DIALOG_OTHERS_BIZ 475 //
#define DIALOG_HOUSE_MENU 476 //
#define DIALOG_SELL_HOUSE 477 //
#define DIALOG_RENAME_SHOP 478 //
#define DIALOG_SELL_SHOP 479 //
#define DIALOG_SUPPLY 480 //
#define DIALOG_STORE_MONEY 481 //
#define DIALOG_WITHDRAW_MONEY 482 //
#define DIALOG_EDIT_FURNITURE 483 //
#define DIALOG_SELL_FURNITURE 484 //
#define DIALOG_BUY_FURNITURE 485 //
#define DIALOG_MOVE_FURNITURE 486 //
#define DIALOG_FURNITURE_BOUGHT 487 //
#define DIALOG_SHOP 488 //
#define DIALOG_SHOP_MENU 489 //
Again; thanks to anyone who can even remotely help
I don't know what the problem hear is to be honest but this is why I don't use filterscripts much and when I do I implement them into my gamemode ((Copy and paste everything from the filterscript into the gamemode's pawno file etc)) because sometime's filter scripts can mess with some of the things you already have.

I don't know if this could help but maybe show us the part on the sasino script of where the player enter's a house?
Reply
#3

Show the piece of code of the dialog that appears when you walk into the house pickup.
Reply
#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
#5

Alright I looked into it, and I noticed that The housing system uses Dialog ID 469 for errors
And I also noticed that you get the dialog That shows "You have entered an incorrect password" Is by any chance the dialog ID of the wrong password 469?
Reply
#6

Quote:
Originally Posted by Y_Less
View Post
If the IDs are mixed up, change them!
I have changed them a few times to see if it fixes it but it does nothing

Quote:
Originally Posted by shadowdog
View Post
Alright I looked into it, and I noticed that The housing system uses Dialog ID 469 for errors
And I also noticed that you get the dialog That shows "You have entered an incorrect password" Is by any chance the dialog ID of the wrong password 469?
For the "You have entered an incorrect password" dialog; I just recall the DIALOG_LOGIN. Could that be it?
The DIALOG_LOGIN id is 228
Reply
#7

Could you post a piece of your login? if it's not in there, I'm afraid I cannot help you.
preferably the whole case of DIALOG_LOGIN
Reply
#8

Quote:
Originally Posted by shadowdog
View Post
Could you post a piece of your login? if it's not in there, I'm afraid I cannot help you.
preferably the whole case of DIALOG_LOGIN

Ok Heres the OnDialogResponse for the login.

pawn Code:
case DIALOG_LOGIN:
        {
            new Float:x, Float:y, Float:z, Float:angle, inter, vw;
            x = PlayerInfo[playerid][pLastX];
            y = PlayerInfo[playerid][pLastY];
            z = PlayerInfo[playerid][pLastZ];
            angle = PlayerInfo[playerid][pLastA];
            inter = PlayerInfo[playerid][pInt];
            vw = PlayerInfo[playerid][pVW];
           
           
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    //ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
                    SetPlayerPos(playerid,x,y,z);
                    SetPlayerFacingAngle(playerid,angle);
                    SetPlayerInterior(playerid,inter);
                    SetPlayerVirtualWorld(playerid,vw);
                    SpawnPlayer(playerid);
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
Reply
#9

Okay, so this
pawn Code:
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
Appears after this happens
pawn Code:
stock EnterHouse(playerid, houseid)
{
        SetPlayerPos(playerid, HouseInfo[houseid][InteriorX], HouseInfo[houseid][InteriorY], HouseInfo[houseid][InteriorZ]);
        SetPlayerInterior(playerid, HouseInfo[houseid][Interior]);
        SetPlayerVirtualWorld(playerid, HouseInfo[houseid][VirtualWorld]);
        SetLastHouse(playerid, houseid);
        TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~r~Please Wait", 2000, 5);
        SetTimerEx("player_unfreeze", 2000, false, "i", playerid);
        return 1;
}
I think I know what's up,

pawn Code:
case DIALOG_OTHERS_HOUSE:
                {
                        if(!response) return 1;
                        if(HouseInfo[hID][Locked] == 1)
                        {
                                FS_MsgBox(playerid, BOX_STYLE_ERROR, "This house is {FF0000}locked.");
                        }
                        else
                        {
                                EnterHouse(playerid, hID);
                        }
                        return 1;
                }
You did not include list items, so he displays the errorMSGBOX and tp to the location, add the listitem and see if it works. or change
pawn Code:
ShowPlayerDialog(playerid, DIALOG_OTHERS_HOUSE, DIALOG_STYLE_LIST, string, string2, "OK", "Close");
to a MSGBOX
Reply
#10

Quote:
Originally Posted by shadowdog
View Post
SNIP
Awesome thanks

Is this what you mean?

pawn Code:
case DIALOG_OTHERS_HOUSE:
        {
            if(!response) return 1;
            switch(listitem)
            {
                case 0:
                {
                    if(HouseInfo[hID][Locked] == 1)
                    {
                        FS_MsgBox(playerid, BOX_STYLE_ERROR, "This house is {FF0000}locked.");
                    }
                }  
                case 1:
                {
                    EnterHouse(playerid, hID);
                }
            }
            return 1;
        }
Changing it to a MSGBOX does nothing either
Reply
#11

Hmm if that didn't work, then I don't know what would, I can't help you with this...
I suggest you go into your login system and search for the term "DIALOG_LOGIN", and what causes this dialog to show, maybe you find something.

Good luck with your search!
Reply
#12

Quote:
Originally Posted by shadowdog
Посмотреть сообщение
Hmm if that didn't work, then I don't know what would, I can't help you with this...
I suggest you go into your login system and search for the term "DIALOG_LOGIN", and what causes this dialog to show, maybe you find something.

Good luck with your search!

Ok thanks for trying

Already looked through what causes the dialog to appear like 100times

I tried removing the 'you have entered the incorrect password' dialog and then the issue just moves onto the next dialog so it seems I might only be able to resolve it by creating a dummy dialog that does nothing and just hope it has no effects on anything else :P
Reply
#13

(Bump )

Actually; it seems as if the most recently used dialog is what appears if you enter a house :S

Example: I logged in and walked to a store and bought a packet of cigarettes. When i enter my house; it gave me the message saying "You have purchased a packet of cigarettes".
Reply
#14

(bump)

Anyone have any clue?
Reply
#15

did you try to change the dialog id? of sasinos FS?
Reply
#16

Quote:
Originally Posted by drichie
Посмотреть сообщение
did you try to change the dialog id? of sasinos FS?
Yeh

I've changed each several times to try work it out but it still doesn't work.

Whichever Dialogue I last interacted with is what appears.
Reply
#17

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
(Bump )

Actually; it seems as if the most recently used dialog is what appears if you enter a house :S

Example: I logged in and walked to a store and bought a packet of cigarettes. When i enter my house; it gave me the message saying "You have purchased a packet of cigarettes".
Are you using any variables to store dialogs or something?
Reply
#18

Quote:
Originally Posted by Gryphus One
Посмотреть сообщение
Are you using any variables to store dialogs or something?
I just define the dialogues with IDs at the top of my script. (code below)

pawn Код:
//Dialogs.
#define DIALOG_CLICKEDREG       220
#define DIALOG_CLICKEDLOGIN     221
#define DIALOG_REGISTER         222
#define DIALOG_GENDER           223
#define DIALOG_RACE             224
#define DIALOG_ARRIVAL          225
#define DIALOG_AGE              226
#define DIALOG_RELOGMSG         227
#define DIALOG_LOGIN            228
#define DIALOG_SUCCESS_1        229
#define DIALOG_SUCCESS_2        230
#define DIALOG_QUESTION1        231
#define DIALOG_QUESTION2        232
#define DIALOG_QUESTION3        233
#define DIALOG_QUESTION4        234
#define DIALOG_QUESTION5        235
#define DIALOG_QUESTION6        236
#define DIALOG_QUESTION7        237
#define DIALOG_QUESTION8        238

#define DIALOG_GOTOLOC          239

#define DIALOG_IDLEGASBUY       240
#define DIALOG_IDLESTACKEAT     241
#define DIALOG_MARINABURGEREAT  242
#define DIALOG_JEFFERSONS24/7BUY   243

#define DIALOG_VEHICLEBUY           244
#define DIALOG_VEHICLEBUY2DOOR      245
#define DIALOG_VEHICLEBUY4DOOR      246
#define DIALOG_VEHICLEBUYLOWRIDER   247
#define DIALOG_VEHICLEBUY4BY4       248
#define DIALOG_VEHICLEBUYSALOON     249

#define DIALOG_IDBUY                250
#define DIALOG_LICENSEBUY           251
And Sasinoft does the same thing with his dialogues.
pawn Код:
// Dialogs
#define DIALOG_FORSALE_HOUSE 470 //
#define DIALOG_MY_HOUSE 471 //
#define DIALOG_OTHERS_HOUSE 472 //
#define DIALOG_FORSALE_BIZ 473 //
#define DIALOG_MY_BIZ 474 //
#define DIALOG_OTHERS_BIZ 475 //
#define DIALOG_HOUSE_MENU 476 //
#define DIALOG_SELL_HOUSE 477 //
#define DIALOG_RENAME_SHOP 478 //
#define DIALOG_SELL_SHOP 479 //
#define DIALOG_SUPPLY 480 //
#define DIALOG_STORE_MONEY 481 //
#define DIALOG_WITHDRAW_MONEY 482 //
#define DIALOG_EDIT_FURNITURE 483 //
#define DIALOG_SELL_FURNITURE 484 //
#define DIALOG_BUY_FURNITURE 485 //
#define DIALOG_MOVE_FURNITURE 486 //
#define DIALOG_FURNITURE_BOUGHT 487 //
#define DIALOG_SHOP 488 //
#define DIALOG_SHOP_MENU 489 //
Any ideas?
Reply
#19

You know what? I'm going to download that Sasino's filterscript and test it with my own gamemode to see if I get the same bug. This way we can tell if it's a problem of that filterscript or of your gamemode.
Reply
#20

Quote:
Originally Posted by Gryphus One
Посмотреть сообщение
You know what? I'm going to download that Sasino's filterscript and test it with my own gamemode to see if I get the same bug. This way we can tell if it's a problem of that filterscript or of your gamemode.
Oh thanks a lot man, really appreciate it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)