Raised This Month: $ Target: $400
 0% 

Remove Drop Weapons without C4


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kiryxapro
New Member
Join Date: May 2013
Old 05-23-2013 , 10:58   Remove Drop Weapons without C4
Reply With Quote #1

Hello!I have one problem with plugin "Remove Drop Weapons".This plugin dropped all weapons including C4.I want to this plugin do not dropped C4.How can i realised?

Sma code:
Code:
#include <amxmodx>
#include <fakemeta>
 
new PLUGIN[] = "Remove Drop Weapons"
new VERSION[] = "0.0.2"
new AUTHOR[] = "Athix"
 
new Pcvar_Remove;
new Pcvar_TimeRemove;
new DeleteWeapons;
 
public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
       
        Pcvar_Remove = register_cvar("amx_remove_item_dropped", "1")
        Pcvar_TimeRemove = register_cvar("amx_time_to_remove","1.0")
       
        register_forward(FM_SetModel, "Fw_SetModel")
       
        DeleteWeapons = get_pcvar_num(Pcvar_Remove)
}
 
public Fw_SetModel(entity, const model[])
{
        static Float:Timetoremove
        Timetoremove = get_pcvar_float(Pcvar_TimeRemove)
       
        if (DeleteWeapons > 0)
        {
                set_task(Timetoremove, "RemoveItems", entity)
                return;
        }
}
 
public RemoveItems(entity)
{
        static Class[10]
        pev(entity, pev_classname, Class, sizeof Class - 1)
               
        if (equal(Class, "weaponbox"))
        {
                set_pev(entity, pev_nextthink, get_gametime() + DeleteWeapons)
                return;
        }
}
kiryxapro is offline
fl0werD
Senior Member
Join Date: May 2011
Old 05-23-2013 , 11:47   Re: Remove Drop Weapons without C4
Reply With Quote #2

C4 is not weapobox.
fl0werD is offline
Send a message via ICQ to fl0werD
kiryxapro
New Member
Join Date: May 2013
Old 05-23-2013 , 12:35   Re: Remove Drop Weapons without C4
Reply With Quote #3

Maybe,but C4 is dropped with this plugin.What to do?
kiryxapro is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-23-2013 , 13:15   Re: Remove Drop Weapons without C4
Reply With Quote #4

check if the player has the C4, if so, give it again after stripping the weapons.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-23-2013 , 13:26   Re: Remove Drop Weapons without C4
Reply With Quote #5

Search, it has already be done.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 05-23-2013 , 13:50   Re: Remove Drop Weapons without C4
Reply With Quote #6

Quote:
Originally Posted by Napoleon_be View Post
check if the player has the C4, if so, give it again after stripping the weapons.
+ after giving the c4, add these:
PHP Code:
cs_set_user_plantid );
set_pev(idpev_body1); 
Unkolix is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-23-2013 , 14:49   Re: Remove Drop Weapons without C4
Reply With Quote #7

Quote:
Originally Posted by Unkolix View Post
+ after giving the c4, add these:
PHP Code:
cs_set_user_plantid );
set_pev(idpev_body1); 
^
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-23-2013 , 16:02   Re: Remove Drop Weapons without C4
Reply With Quote #8

Guys, it is about removing dropped weapons...

https://forums.alliedmods.net/showth...ight=weaponbox
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 05-23-2013 at 16:41.
ConnorMcLeod is offline
kiryxapro
New Member
Join Date: May 2013
Old 05-24-2013 , 04:50   Re: Remove Drop Weapons without C4
Reply With Quote #9

Thanks to ConnorMcLeod for this plugin:
https://forums.alliedmods.net/showth...ight=weaponbox

It works!

Last edited by kiryxapro; 05-24-2013 at 04:51.
kiryxapro is offline
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:23.


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