pawn Code:
if(dialogid == BUYHOUSELOCK)
{
if(response)
{
if(GetPlayerMoney(playerid) < PHouseLock(listitem)) return SendClientMessage(playerid, COLOR_WHITE, "You do not have enough cash!");
if(PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID && PlayerInfo[playerid][pPhousekey2] != INVALID_HOUSE_ID)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, BUYHOUSELOCK2, DIALOG_STYLE_LIST, "Purchasing House Lock", "House slot 1\nHouse slot 2","Choose","Cancel");
}
else
{
ShowPlayerDialog(playerid, BUYHOUSELOCK3, DIALOG_STYLE_LIST, "Purchasing House Lock", "House slot 1\nHouse slot 2","Choose","Cancel");
}
}
else if(PlayerInfo[playerid][pPhousekey2] == INVALID_HOUSE_ID && PlayerInfo[playerid][pPhousekey] != INVALID_HOUSE_ID)
{
PlayerInfo[playerid][pHouseLock] = listitem+1;
GivePlayerCash(playerid, -PHouseLock(listitem));
return SendClientMessage(playerid, COLOR_WHITE, "You have purchased the lock successfully for your first house slot!");
}
else if(PlayerInfo[playerid][pPhousekey2] != INVALID_HOUSE_ID && PlayerInfo[playerid][pPhousekey] == INVALID_HOUSE_ID)
{
PlayerInfo[playerid][pHouseLock2] = listitem+1;
GivePlayerCash(playerid, -PHouseLock(listitem));
return SendClientMessage(playerid, COLOR_WHITE, "You have purchased the lock successfully for your first second slot!");
}
}
}
if(dialogid == BUYHOUSELOCK2)
{
switch(listitem)
{
case 0:
{
PlayerInfo[playerid][pHouseLock] = 1;
GivePlayerCash(playerid, -50000);
return SendClientMessage(playerid, COLOR_WHITE, "You have purchased a door lock successfully for your first house slot!");
}
case 1:
{
PlayerInfo[playerid][pHouseLock2] = 1;
GivePlayerCash(playerid, -50000);
return SendClientMessage(playerid, COLOR_WHITE, "You have purchased a door lock successfully for your second house slot!");
}
}
}
if(dialogid == BUYHOUSELOCK3)
{
switch(listitem)
{
case 0:
{
PlayerInfo[playerid][pHouseLock] = 2;
GivePlayerCash(playerid, -250000);
return SendClientMessage(playerid, COLOR_WHITE, "You have purchased a central lock system successfully for your first house slot!");
}
case 1:
{
PlayerInfo[playerid][pHouseLock2] = 2;
GivePlayerCash(playerid, -250000);
return SendClientMessage(playerid, COLOR_WHITE, "You have purchased a central lock system successfully for your second house slot!");
}
}
}
Irrelevant though, even if I did not have a dialogid here it would've still showed.