Can anyone see anything inherently wrong with the following code:
Code:
kick_player(id, reasonMatch[])
{
new userid = get_user_userid(id)
server_cmd("amx_kick #%d inappropriate name (%s)", userid, reasonMatch)
return PLUGIN_CONTINUE
}
ban_player(id, reasonMatch[])
{
new userid = get_user_userid(id)
new banTime = get_cvar_num("restnames_bantime")
new banLength[50]
if (banTime == 0)
banLength = "permanently"
else if (banTime == 1)
banLength = "for 1 minute"
else
format(banLength, 49, "for %i minutes", banTime)
if( get_cvar_num("restnames_amxban") != 1)
{
server_cmd("banid %i #%i;writeid", get_cvar_num("restnames_bantime"), userid)
server_cmd("amx_kick #%i banned %s due to inappropriate name (%s)", userid, banLength, reasonMatch)
}
else
{
new authid[32]
get_user_authid(id, authid, 31)
server_cmd("amx_ban %i %s inappropriate name (%s)", get_cvar_num("restnames_bantime"), authid, reasonMatch)
}
return PLUGIN_CONTINUE
}
I'm testing a new plugin I'm writing (my first ever) and I don't seem to be able to kick or ban myself.
Could it be because I have immunity? <moments later> Just tested that theory. I took my immunity off but it still wouldn't kick myself.