Создаю плагин которые дает админку по стиму, но вот что то не работает...
Code
#include <amxmodx>
#include <amxmisc>
new steam_id[128][16]
public plugin_init() {
register_plugin("PCW Admin", "1.0", "arqawa")
register_srvcmd("_readm", "reloadaccess")
loadbase()
}
public loadbase() {
new base[64]
get_configsdir(base, 63)
format(base, 63, "%s/pcwadmin.ini", base)
new text[256], a
for(new z = 1; z <= 128; z++) {
read_file(base, z, text, 255, a)
if(text[0] == ';') continue
parse(text, steam_id[z - 1], 31)
}
return PLUGIN_CONTINUE
}
public clientaccess(id) {
remove_user_flags(id)
new c_steam_id[32]
get_user_authid(id, c_steam_id, 31)
for(new b = 0; b < 128; b++) if(equal(c_steam_id, steam_id[b])) set_user_flags(id, ADMIN_IMMUNITY)
}
public client_authorized(id) clientaccess(id)
public reloadaccess() {
loadbase()
new id[32], num
get_players(id, num)
for(new x = 0; x < num; x++) clientaccess(id[x])
return PLUGIN_HANDLED
}