Raised This Month: $ Target: $400
 0% 

how to restrict kevlar?


Post New Thread Reply   
 
Thread Tools Display Modes
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
VEN
Veteran Member
Join Date: Jan 2005
Old 05-22-2006 , 03:34  
Reply With Quote #2

Just use
Code:
server_cmd("amx_restrict on vest vesthelm")
VEN is offline
Mini_Midget
Veteran Member
Join Date: Jan 2006
Location: It's a mystery.
Old 05-22-2006 , 04:57  
Reply With Quote #3

correct me if i'm wrong but isn't there a restriction for kevlar in the restmenu built in with amxx?
why not just use that instead?
__________________
It's a mystery.
Mini_Midget is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-22-2006 , 08:35  
Reply With Quote #4

Quote:
Originally Posted by Mini_Midget
correct me if i'm wrong but isn't there a restriction for kevlar in the restmenu built in with amxx?
why not just use that instead?


Quote:
Originally Posted by VEN
Just use
Code:
server_cmd("amx_restrict on vest vesthelm")
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SuperDuper
Member
Join Date: May 2006
Location: na
Old 05-22-2006 , 09:32  
Reply With Quote #5

do i replace what i already have?? im not sure where to put it
__________________
[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
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-22-2006 , 09:38  
Reply With Quote #6

Put it somewhere in epicon, and then put a copy of it except change "on" to "off" in the epicoff function.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SuperDuper
Member
Join Date: May 2006
Location: na
Old 05-22-2006 , 09:41  
Reply With Quote #7

k thanx
__________________
[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
Reply



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