[MySQL] Need help, calling all MySQL gurus. WILL +REP :D
#1

Close thread, thanks.
Reply
#2

I'm not quite sure what you mean by returning a playerid but here is what I think you mean:
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];
}
Usage could be:

pawn Код:
new string[2050];
format(string, sizeof(string), "Cops: %s", ListAllCops());
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)