Raised This Month: $ Target: $400
 0% 

Bug


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 06-30-2006 , 12:51   Re: Bug
Reply With Quote #5

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")
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode