16.04.2012, 09:51
I'm not quite sure what you mean by returning a playerid but here is what I think you mean:
Usage could be:
pawn Код:
stock ListAllCops()
{
mysql_query("SELECT name FROM players WHERE faction = 1");
mysql_store_result();
new massivestr[2000], name[30];
while(mysql_retrieve_row())
{
mysql_get_field("name", name);
format(massivestr, sizeof(massivestr), "%s, %s", massivestr, name)
}
mysql_free_result();
return massivestr[1];
}
pawn Код:
new string[2050];
format(string, sizeof(string), "Cops: %s", ListAllCops());