ShowModelSelectionMenuEx - Array
#1

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:

Код:
				            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);
Console Printf return:
Код:
list =
283
282
And yep i just started with mselection :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)