SA-MP Forums Archive
Command Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command Problem (/showthread.php?tid=284319)



Command Problem - Dr - 18.09.2011

pawn Код:
CMD:house(playerid, params[])
{
    for(new i = 0;i < sizeof(HouseInfo);i++)
    {
        if(IsPlayerInRangeOfPoint(playerid,2,HouseInfo[i][hExitX],HouseInfo[i][hExitX],HouseInfo[i][hExitX]))
        {
            if(HouseInfo[i][hOwned] == 0 && PlayerInfo[playerid][pHouse] == 0 && HouseInfo[i][hRentable] == 0)
            {
                ShowPlayerDialog(playerid, 28, DIALOG_STYLE_LIST, "House Information", "Buy House\r\n", "Select", "Close");
            }
            else if(HouseInfo[i][hOwned] == 0 && PlayerInfo[playerid][pHouse] == 0 && HouseInfo[i][hRentable] == 1)
            {
                ShowPlayerDialog(playerid, 31, DIALOG_STYLE_LIST, "House Information", "Buy House\r\nRent House\r\n", "Select", "Close");
            }
            else if(HouseInfo[i][hOwned] == 1)
            {
                if(!strcmp(HouseInfo[i][hOwner],GetPlayerNameEx(playerid)))
                {
                    ShowPlayerDialog(playerid, 29, DIALOG_STYLE_LIST, "House Information", "Sell House\r\nSet Rent\r\nLock House\r\nUnlock House\r\nHouse Balance\r\n", "Select", "Close");
                }
                else
                {
                    if(HouseInfo[i][hRentable] == 1)
                    {
                        ShowPlayerDialog(playerid, 30, DIALOG_STYLE_LIST, "House Information", "Rent House\r\n", "Select", "Close");
                    }
                }
            }
        }
    }
    return 1;
}
Why will it not open the dialogs in game?