Code:
new player = cmd_target(id, arg, 1)
Just to clear things up, that "1" is what flags you want, and according to the
funcwiki:
Flags:
1 - obey immunity
2 - allow yourself
4 - must be alive
8 - can't be bot
That might explain why it doesnt work on admins with immunity.
And with:
Code:
public godmode(id,level,cid) {
new arg[24]
read_argv(1,arg,23)
new player = cmd_target(id, arg, 1)
if(!cmd_access(id,level,cid,2))
{
return PLUGIN_HANDLED
}
if(get_user_godmode(player) == 1) {
client_print(player, print_center, "[FunMod] Godmode is already enabled!")
}
else
{
set_user_godmode(player, 1)
client_print(player, print_center, "[FunMod] You have godmode enabled!",player)
}
return PLUGIN_CONTINUE
}
If you change the very last return PLUGIN_CONTINUE to PLUGIN_HANDLED, I believe it should get rid of the "fun_godmode not found" in the console.
__________________