Re: /votekick say command for players
How to block Adminvotes only if the admin can Ban?
My solution:
PHP Code:
public startvotekick(id) { if(canvote) { client_print(id,print_chat,"Another vote kick is in progress or has just ended, please wait") return PLUGIN_HANDLED } new name[32] new authid[32] new name2[32] new authid2[32] get_user_name(id,name,31) get_user_authid(id,authid,31) get_user_name(votekicking[id],name2,31) get_user_authid(votekicking[id],authid2,31) server_print("-") if(get_pcvar_num(cvaravk)) { new i,maxpl,done maxpl = get_maxplayers() while (i<maxpl) { if(is_user_connected(i)) { if(get_user_flags(i) && ADMIN_LEVEL_D) ; MODIFIED!!! { done=1 client_print(i,print_chat,"%s Tryed to votekick %s, This votekick was blocked due to a connected admin.",name,name2) } } ++i } if(done) { client_print(id,print_chat,"An admin is currently connected to the server, you can't votekick.") return PLUGIN_CONTINUE } } new message[200] new nowtime[32] get_time("%x %X",nowtime,31) format(message,199,"%s: %s %s started a votekick against %s %s Reason to votekick:",nowtime,name,authid,name2,authid2) write_file("addons/amxmodx/logs/votekick.log","") write_file("addons/amxmodx/logs/votekick.log",message) write_file("addons/amxmodx/logs/votekick.log",votekickreason) votekick(id) return PLUGIN_CONTINUE }
Dont work. Please help me!
|