dialog only loads the first integer
#1

Hello.
i have this code, and it only loads the first one.
How can i make it work?
command:
PHP код:
COMMAND:temp(playerid,params[])
{
new 
query[420];
format(query,sizeof(query),"SELECT * FROM vehicles WHERE owner='%s'",PlayerName(playerid));
mysql_function_query(dbhandle,query,true,"OnCarSpawnCommand","i",playerid);
return 
1;

function
PHP код:
forward OnCarSpawnCommand(playerid);
public 
OnCarSpawnCommand(playerid)
{
new 
num_fields2,num_rows2;
new
    
string  500 ],
    
string1337[420],
    
temp_carowner[35];
cache_get_data(num_rows2,num_fields2,dbhandle);
if(
num_rows2!=0)
{
for(new 
0sizeof(num_rows2); v++)
{
  
cache_get_field_content(v"owner"temp_carowner);
  
format(string1337,sizeof(string1337),"%s",temp_carowner);
  
myStrcpy(cInfo[v][carowner], string1337);
  
 if(!
strcmp(cInfo[v][carowner], PlayerName(playerid), false))
 {
    
format(stringsizeof(string), "%i (%i)\n"cache_get_field_content_int(v,"model",dbhandle),cache_get_field_content_int(v,"id",dbhandle));
 }
 else
 {
 return 
1;
 }
}
}
ShowPlayerDialog(playerid,DIALOG_CARSPAWN,DIALOG_STYLE_LIST,"Car spawning",string,"Spawn","Close");
return 
1;

Reply


Messages In This Thread
dialog only loads the first integer - by justjamie - 27.05.2016, 19:42
Re: dialog only loads the first integer - by justjamie - 27.05.2016, 19:59
Re: dialog only loads the first integer - by Stinged - 27.05.2016, 20:25
Re: dialog only loads the first integer - by justjamie - 27.05.2016, 20:28
Re: dialog only loads the first integer - by dicknyson - 27.05.2016, 20:33
Re: dialog only loads the first integer - by justjamie - 28.05.2016, 16:37
Re: dialog only loads the first integer - by Stinged - 28.05.2016, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)