dialog only loads the first integer
#7

Код:
COMMAND:temp(playerid, params[])
{
	new query[62];
	GetPlayerName(playerid, query, 24);
	format(query, sizeof(query), "SELECT * FROM vehicles WHERE owner='%s'", query);
	mysql_function_query(dbhandle, query, true, "OnCarSpawnCommand", "i", playerid);
	return 1; 
}

forward OnCarSpawnCommand(playerid);
public OnCarSpawnCommand(playerid)
{
	new
		rows, fields;
	cache_get_data(rows, fields, dbhandle);
	
	if (rows)
	{
		new str[512];
		for (new v = 0; v < rows; v++)
		{ 
			format(str, sizeof(str), "%s%i (%i)\n", str, cache_get_field_content_int(v, "model", dbhandle), cache_get_field_content_int(v, "id", dbhandle));
		}
		ShowPlayerDialog(playerid, DIALOG_CARSPAWN, DIALOG_STYLE_LIST, "Car spawning", str, "Spawn", "Close");
		return 1;
	}
	SendClientMessage(playerid, 0xFF0000FF, "Could not find anything in the database.");
	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)