Hi all, i'm trying to make a event point system, /winers based in mysql.
So yea heres the command.
Now everything runs fine, there's no mysql error given i cant get more than 10 players in the server, it start crashing the others for some reason, probably i missed up something?
So yea heres the command.
PHP Code:
CMD:winers(playerid, parmas[])
{
mysql_tquery(sql_connect, "SELECT * FROM `users` ORDER BY `eventpoints` DESC LIMIT 10", "OnQueryFinishup", "ii", THREAD_EVENTWINER, playerid);
return 1;
}
case THREAD_EVENTWINER:
{
new username[MAX_PLAYER_NAME], eventpoints[24];
SendClientMessage(extraid, COLOR_GREEN, "---- Event Winners ----");
for(new i = 0; i < rows; i ++)
{
cache_get_field_content(i, "username", username);
cache_get_field_content(i, "eventpoints", eventpoints);
SendClientMessageEx(extraid, COLOR_GREY2, "%s - Event points: %d", username, eventpoints);
}
}