I am new to small so im trying out simple plugs i made this plug in to make like a simple slay plug in
Code:
#include <amxmodx>
public plugin_init() {
register_plugin("test-slay","0.1","Bone")
register_concmd("die","die",ADMIN_KICK," user Kicks the specified user")
}
public die(id) {
if (!(get_user_flags(id)&ADMIN_KICK)) {
console_print(id,"[AMXX] No access")
return PLUGIN_HANDLED
}
if (read_argc() == 0) {
console_print(id,"[AMXX] You must specify a user")
return PLUGIN_HANDLED
}
new user[32], uid
read_argv(1,user,32)
uid = find_player("bh",user)
if (uid == 0) {
console_print(id,"[AMXX] Invalid User Id")
return PLUGIN_HANDLED
}
client_cmd(uid,"echo you got pwned!")
client_cmd(uid,"user_kill")
console_print(id,"Killed player!")
return PLUGIN_HANDLED
}
however im not sure if
Code:
client_cmd(uid,"user_kill")
is correct or if i should have put like
but anyways thats not the problem, the problem is whenever i try to use command it says i have no access now i have full admins rights and i can use buikt in amx admin commands like amx_slay, amx_kick etc. SO i have no idea why it says i dont have access. please help