CMD:members(playerid,params[]){ if(pInfo[playerid][pAdmin] >= 1) { new id; if(sscanf(params,\"d\",id)) return SCM(playerid,COLOR_WHITE,\"(( Használat: /members [frakció id] ))\"); if(id >= 0 && id <= MAX_FRACTIONS) { mysql_format(mysql_id, query, sizeof(query), \"SELECT * FROM `users` WHERE `fraction` = \'%d\'\", id); mysql_tquery(mysql_id, query, \"\", \"\"); new num_rows,num_fields; cache_get_data(num_rows,num_fields,mysql_id); new username[MAX_PLAYER_NAME]; new rang; new string[128]; if(num_rows > 0) { for(new i = 0; i < num_rows; i++) { cache_get_field_content(i,\"name\",username); rang = cache_get_field_content_int(i,\"rank\"); if(ReturnUser(username)) { format(string, sizeof(string), \"%d. NÉV: %s | RANG: %d - ONLINE\", i, username, rang); return SendClientMessage(playerid, -1, string); } format(string, sizeof(string), \"%d. NÉV: %s | RANG: %d - OFFLINE\", i, username, rang); SendClientMessage(playerid, -1, string); } } else SCM(playerid,COLOR_WHITE,\"(( A frakció üres! ))\"); } else SCM(playerid,COLOR_ORANGE,\"(( A frakció id-nek 0 és 30 között kell lennie! ))\"); } else perm(playerid); return 1;}
forward successQuery_members(playerid);public successQuery_members(playerid) {new num_rows,num_fields;cache_get_data(num_rows,num_fields,mysql_id);new username[MAX_PLAYER_NAME];new rang;new string[128];if(num_rows > 0){ for(new i = 0; i < num_rows; i++) { cache_get_field_content(i,\"name\",username); rang = cache_get_field_content_int(i,\"rank\"); if(ReturnUser(username)) { format(string, sizeof(string), \"%d. NÉV: %s | RANG: %d - ONLINE\", i, username, rang); return SendClientMessage(playerid, -1, string); } format(string, sizeof(string), \"%d. NÉV: %s | RANG: %d - OFFLINE\", i, username, rang); SendClientMessage(playerid, -1, string); }}else SCM(playerid,COLOR_WHITE,\"(( A frakció üres! ))\");}CMD:members(playerid,params[]){if(pInfo[playerid][pAdmin] >= 1){ new id; if(sscanf(params,\"d\",id)) return SCM(playerid,COLOR_WHITE,\"(( Használat: /members [frakció id] ))\"); if(id >= 0 && id <= MAX_FRACTIONS) { mysql_format(mysql_id, query, sizeof(query), \"SELECT * FROM `users` WHERE `fraction` = \'%d\'\", id); mysql_tquery(mysql_id, query, \"successQuery_members\", \"i\", playerid); } else SCM(playerid,COLOR_ORANGE,\"(( A frakció id-nek 0 és 30 között kell lennie! ))\");}else perm(playerid);return 1;}