This really needs a rewrite, here is a fixed version, it is untested however:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
new isninja[33]
public plugin_init() {
register_plugin("WcW's Silent Plugin","1.0","WhoCaresWho")
register_concmd("amx_silent","do_si",ADMIN_KICK,"Makes User Silent")
register_event("ResetHUD","fnSetNinja","be")
}
public do_si(id,level,cid) {
if(!cmd_access(id,level,cid,2))
return PLUGIN_HANDLED
new user[32], uid
read_argv(1,user,32)
uid = cmd_target(id,user)
if (!uid)
return PLUGIN_HANDLED
else
{
isninja[uid] = 1
static szName[33],szAdminName[33]
get_user_name(uid,szName,32)
get_user_name(id,szAdminName,32)
fnSetNinja(id)
switch(get_cvar_num("amx_show_activity"))
{
case 1 :
client_print(0,print_chat,"ADMIN: %s has become a ninja",szName)
case 2 :
client_print(0,print_chat,"ADMIN %s: %s has become a ninja",szAdminName,szName)
}
}
return PLUGIN_HANDLED
}
public fnSetNinja(id)
{
// I'm going to leave these and not do it the proper way,
// on the off chance that this is actually the proper way
// for your mod.
client_cmd(id,"model ninja")
client_cmd(id,"name Ninja")
set_user_noclip(id,1)
set_user_rendering(id,kRenderFxGlowShell,255,255,255,kRenderNormal,25)
}
public client_disconnect(id)
isninja[id] = 0
public plugin_precache( )
precache_model("models/player/ninja/ninja.mdl")