#include <amxmodx> #include <amxmisc> #define MAX_GROUPS 9 new g_groupNames[MAX_GROUPS][] = { "--- [1]Owner ---", "--- [2]Co-Owner ---", "--- [3]Maresal ---", "--- [4]General ---", "--- [5]Colonel ---", "--- [6]Maior ---", "--- [7]Sergent ---", "--- [8]Soldat ---", "--- [9]V.I.P ---" } new g_groupFlags[MAX_GROUPS][] = { "abcdefghijklmnopqrstu", "abcdefghijklmnopqrst", "abcdefghijlmnopqrst", "bcdefghijlmnopqrs", "bcdefgijlmnopqr", "bcdefgijmnop", "bcdefgijmn", "b", "abeci" } new g_groupFlagsValue[MAX_GROUPS] public plugin_init() { register_plugin("Amx_who", "1.0", "LaLeagane.ro") register_concmd("amx_who", "cmdWho", 0) for(new i = 0; i < MAX_GROUPS; i++) { g_groupFlagsValue[i] = read_flags(g_groupFlags[i]) } } public cmdWho(id) { new players[32], inum, player, name[32], i, a get_players(players, inum) console_print(id, "Aici punem numele la server.") for(i = 0; i < MAX_GROUPS; i++) { console_print(id, "%s", g_groupNames[i]) for(a = 0; a < inum; ++a) { player = players[a] get_user_name(player, name, 31) if(get_user_flags(player) == g_groupFlagsValue[i]) { console_print(id, "%s", name) } } } console_print(id, "- BesT ADMINS -") return PLUGIN_HANDLED }
Cea ce noi trebuie sa modificam este
Aceasta
"--- [1]Owner ---", "--- [2]Co-Owner ---", "--- [3]Maresal ---", "--- [4]General ---", "--- [5]Colonel ---", "--- [6]Maior ---", "--- [7]Sergent ---", "--- [8]Soldat ---", "--- [9]V.I.P ---"
Aceasta, Cate Grade dorim sa creem, anume cele de sus, avem 9 Grade trecem la MAX_Groups 9, avem 10 trecem 10.
#define MAX_GROUPS 9
Si in final gradele. !
"abcdefghijklmnopqrstu", "abcdefghijklmnopqrst", "abcdefghijlmnopqrst", "bcdefghijlmnopqrs", "bcdefgijlmnopqr", "bcdefgijmnop", "bcdefgijmn", "b", "abeci"
console_print(id, "Aici punem numele la server.")
Si aici
console_print(id, "Si aici")
Orice ce ati face nu uitati sa nu puneti [ , ] la ultimul acces de jos si ultimul rang, acelea le modificam dupa bunul plac. Gradele si accesele.
Sper sa va fie de folos acest tutorial !