27.02.2019, 14:05
(
Последний раз редактировалось Longover; 27.02.2019 в 14:41.
)
I want to use this command (/staffadmins) to show the admins (offline and online),but at the admin level (nivel de admin) is showed 51 and at Helps (puncte de ajutor) 48.
command:
command:
Код:
CMD:staffadmins(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 6) { new aim[5000], query[300], test[300], test1[300], test2[300], test3[300], aimtotal[5000], result[300], idd, mid=0; format(query, sizeof(query), "SELECT * FROM `users` WHERE `Admin` > '0'"); new Cache: membresult = mysql_query(SQL, query); for(new i, j = cache_get_row_count (); i != j; ++i) { cache_get_field_content(i, "name", result); format(test, 300, result); format(test1,sizeof(test1), "%d",cache_get_field_content_int(i, "Admin")); cache_get_field_content(i, "lastOn", result); format(test2, 300, result); format(test3,sizeof(test3), "%d",cache_get_field_content_int(i, "Helps")); idd = cache_get_field_content_int(i, "id"); Selected[playerid][mid] = idd; new id = GetPlayerID(test); if(id != INVALID_PLAYER_ID) { format(aim, sizeof(aim), "%s\tonline acum\t%d\t%d\n", test, test1, test3); } else { format(aim, sizeof(aim), "%s\t%s\t%d\t%d\n", test, test2, test1, test3); } mid++; } cache_delete(membresult); format(aimtotal, sizeof(aimtotal), "Nume\tUltima logare\tNivel de admin\tPuncte de ajutor\n%s",aim); ShowPlayerDialog(playerid,DIALOG_STAFFAM,DIALOG_STYLE_TABLIST_HEADERS,"ADMINI",aimtotal,"Alege","Iesire"); } return 1; }