So i'm trying to take multiple skin id's from the database and add them to an array and use the array in SelectionMeniuEx, So it works and printf returns a good array however ... ingame models don't match so
ofc i'm doing something wrong anyone with mselection experience pls help me to better understand this / get this working.
Thnx in advance.
Code:
Console Printf return:
And yep i just started with mselection :/
ofc i'm doing something wrong anyone with mselection experience pls help me to better understand this / get this working.
Thnx in advance.
Code:
Code:
cache_delete(copwepload);
SetPlayerDuty(playerid, 1);
new dquery[200], Cache: copskinload;
mysql_format(mysql, dquery, sizeof(dquery), "SELECT `Model`, `Rank`, `Gender` FROM `copskins`");
copskinload = mysql_query(mysql, dquery);
new drows = cache_num_rows();
if(drows)
{
new ap, list[1024], model, rank, gender, tmp[64];
format(list, sizeof(list), "");
for(new d; d < drows; d++)
{
cache_get_value_name_int(d, "Rank", rank);
cache_get_value_name_int(d, "Gender", gender);
if(GetPlayerRank(playerid) >= rank && GetPlayerGender(playerid) == gender)
{
cache_get_value_name_int(d, "Model", model);
ap ++;
format(tmp, sizeof(tmp), "%d\n", model);
strcat(list, tmp);
}
}
printf("list = %s", list);
ShowModelSelectionMenuEx(playerid, list, ap, "Select Clothes", playerid);
ap = 0;
}
cache_delete(copskinload);
Code:
list =
283
282