PHP Code:
#include <amxmodx>
public plugin_init() {
register_plugin("Easy kick","0.1","lukiuz")
register_concmd("kickid","kick_player",ADMIN_KICK," kickid <name> [Kicks player from the server]")
}
public kick_player(id) {
if (!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id,"[EASY KICK] Insuccified privilegies.")
return PLUGIN_HANDLED
}
if (read_argc() == 0) {
console_print(id,"[EASY KICK] Please specify an user.")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0) {
console_print(id,"[EASY KICK] Player was not found.")
return PLUGIN_HANDLED
}
client_cmd(uid,"echo [EASY KICK] You were kicked from the server.")
client_cmd(uid,"disconnect")
console_print(id,"[EASY KICK] Player succesfully kicked.")
return PLUGIN_HANDLED
}
- I want the plugin if not found args write that the player was not found. But it kicks me...
- I want that if player has admin imunity wouldnt be kicked.
- Also i want to know, that if i want player that was kicked to be shown is this code right?
PHP Code:
console_print(id,"[EASY KICK] Player %i succesfully kicked.",uid)
Well im new at coding, so just dont flame about bad layout, code stuff, talking about more easier ways, becouse i thought of this to be easiest way.