Getting all members of club in a dialog problem
#1

Hello, i'm wanting to get all members of a club into a dialog and i got this code:
pawn Код:
Dialog_ClubOwner(playerid, response, listitem)
{
    if(!response) return 1;
    switch(listitem)
    {
        case 0:
        {
            new string[256];
            for(new i = 0; i < MAX_CLUBS; i++)
            {
                if(IsPlayerInRangeOfPoint(playerid, 2.5, AClubData[i][ClubX], AClubData[i][ClubY], AClubData[i][ClubZ]))
                {
                    format(string, sizeof(string), "SELECT Name FROM Users WHERE Club = '%s'", AClubData[i][ClubName]);
                    mysql_function_query(Handle, string, true, "ClubMemberList", "i", playerid);
                }
            }
        }
    }
    return 1;
}
forward ClubMemberList(playerid);
public ClubMemberList(playerid)
{
    new rows, fields, string[1000];
    cache_get_data(rows, fields, Handle);
    for(new i; i < Max_ClubMembers; i++)
    {
        format(string, sizeof(string), "%s%s\n", string, fields);
    }
    ShowPlayerDialog(playerid, DialogClubMembers, DIALOG_STYLE_LIST, "Club members", string, "Ok", "Cancel");
    return 1;
}
But this doesnt give any names. Just weird thingys. Does anyone know how to actually get the names?
Reply


Messages In This Thread
Getting all members of club in a dialog problem - by thimo - 31.01.2014, 06:24
Respuesta: Getting all members of club in a dialog problem - by Zume - 31.01.2014, 06:38
Re: Getting all members of club in a dialog problem - by thimo - 31.01.2014, 06:42
Respuesta: Re: Getting all members of club in a dialog problem - by Zume - 31.01.2014, 06:53
Re: Getting all members of club in a dialog problem - by thimo - 31.01.2014, 06:58
Re: Getting all members of club in a dialog problem - by thimo - 31.01.2014, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)