Raised This Month: $ Target: $400
 0% 

how to restrict kevlar?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SuperDuper
Member
Join Date: May 2006
Location: na
Old 05-22-2006 , 00:35   how to restrict kevlar?
Reply With Quote #1

In my plugin, when you enable it you get 255 armor, but if i use autobuy i buy armor and it goes back down to 100. SO what is a simple code that will restrict armor while the plugin is enabled?

here is my plugin

Code:
#include <amxmodx>     #include <amxmisc>     #include <fun>     #include <engine>   #include <cstrike>   #define PLUGIN "EpicMod"     #define VERSION "1.0"     #define AUTHOR "SuperDuper"   new bool:g_bEpicEnabled public plugin_init()     {         register_plugin(PLUGIN, VERSION, AUTHOR)               register_clcmd("amx_epicon", "cmd_epicon")       register_clcmd("amx_epicoff", "cmd_epicoff")             register_event("ResetHUD","fnEventResetHUD","be")     register_event("CurWeapon","fnEventCurWeapon","be") }   public cmd_epicon(id, level, cid)   {       if (!cmd_access(id, level, cid, 1))           return PLUGIN_HANDLED             new iPlayers[32],iPlayersnum     get_players(iPlayers,iPlayersnum,"a")           g_bEpicEnabled = true           for(new iCount = 0;iCount < iPlayersnum;iCount++)         fnEventResetHUD(iPlayers[iCount])           client_print(0,print_chat,"[AMXX] EpicMod has been enabled.")           return PLUGIN_HANDLED }   public cmd_epicoff(id, level, cid) {     if (!cmd_access(id, level, cid, 0))         return PLUGIN_HANDLED               register_concmd("amx_restrict","cmd_restrict",ADMIN_KICK,"kevlar")     register_concmd("amx_restrict","cmd_restrict",ADMIN_KICK,"kevlar&helmet")                 new iPlayers[32],iPlayersnum     get_players(iPlayers,iPlayersnum,"a")           g_bEpicEnabled = false           for(new iCount = 0;iCount < iPlayersnum;iCount++)         fnEventResetHUD(iPlayers[iCount])           client_print(0,print_chat,"[AMXX] EpicMod has been disabled.")           return PLUGIN_HANDLED }   public fnEventResetHUD(id)     if(g_bEpicEnabled)     {         set_user_footsteps (id, 1)           set_user_health(id, 255)           set_user_gravity (id, 0.20)           set_user_armor (id, 255)         }     else     {         set_user_footsteps (id, 0)           set_user_health(id, 100)           set_user_gravity (id, 1.0)           set_user_armor (id, 100)       } public fnEventCurWeapon(id)     if(g_bEpicEnabled)         set_user_maxspeed(id,0.0)

Thanks...
__________________
[Team.Profit] Profit' <LDR>. Our server owns!

CS:CZ or DIE
SuperDuper is offline
Send a message via AIM to SuperDuper Send a message via MSN to SuperDuper Send a message via Yahoo to SuperDuper
 



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 16:20.


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