//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
// 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 //
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:
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;
}
}
}
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;
}
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? |
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 |
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;
}
}
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");
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;
}
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;
}
ShowPlayerDialog(playerid, DIALOG_OTHERS_HOUSE, DIALOG_STYLE_LIST, string, string2, "OK", "Close");
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;
}
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! |
(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". |
//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
// 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 //
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.
|