Small problem
#3

pawn Код:
COMMAND:gohome(playerid, params[])
{
    new HouseList[258], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    for (new i, h = MAX_HOUSES; i != h; i++)
    {
        if(!strcmp(AHouseData[i][Owner], pName, false))
        {
            new iHouse[58];
            format(iHouse, sizeof(iHouse), "{00FF00}%s{FFFFFF}\n", AHouseData[i][HouseName]);
            strcat(HouseList, iHouse);
        }
    }
    ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_TABLIST, "Choose your house :", HouseList, "Select", "Cancel");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DialogGoHome && response)
    {
        new iCount, pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        for (new i, h = MAX_HOUSES; i != h; i++)
        {
            if(!strcmp(AHouseData[i][Owner], pName, false))
            {
                if(iCount == listitem)
                {
                    SetPlayerPos(playerid, housecordx, housecordy, housecordz);
                    break;
                }
                iCount++;
            }
        }
    }
    if(dialogid == DialogGoHome && !response) return 0;
}
Reply


Messages In This Thread
Small problem - by AlexBlack - 29.05.2015, 20:16
Re: Small problem - by PepsiCola23 - 29.05.2015, 21:22
Re: Small problem - by d3ll - 29.05.2015, 21:47
Re : Small problem - by AlexBlack - 29.05.2015, 22:17
Re : Small problem - by AlexBlack - 29.05.2015, 23:49
Re : Small problem - by AlexBlack - 30.05.2015, 12:40
Re: Small problem - by Konstantinos - 30.05.2015, 13:00
Re : Small problem - by AlexBlack - 30.05.2015, 14:18
Re: Small problem - by Konstantinos - 30.05.2015, 14:42
Re : Small problem - by AlexBlack - 30.05.2015, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)