Raised This Month: $ Target: $400
 0% 

dropped weapons cleaner.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 07-28-2018 , 07:36   dropped weapons cleaner.
Reply With Quote #1

I know there is "no weapons drop" plugin. but I want a plugin that remove the dropped weapons after specified time. I tried making it before but I ended with crashes.
__________________
man_s_our is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-28-2018 , 07:41   Re: dropped weapons cleaner.
Reply With Quote #2

All you have to do is hook FM_SetModel, make sure it's a weaponbox entity and set pev_nextthink to get_gametime() + time, where "time" is after how much time you want the entity to be removed.
__________________
HamletEagle is offline
man_s_our
Senior Member
Join Date: Jul 2017
Location: aim_taliban
Old 07-28-2018 , 09:45   Re: dropped weapons cleaner.
Reply With Quote #3

if you mean this, it didn't work:
PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_SetModel"rem")
}
public 
rem(entitymodel[])
{
    static 
classname[32];
    
pev(entitypev_classnameclassname);
    if(
equal(classname"weaponbox"))
    {
        
set_pev(entitypev_nextthinkget_gametime() + 60.0);
    }

__________________
man_s_our is offline
Old 07-28-2018, 10:15
CrAzY MaN
This message has been deleted by CrAzY MaN.
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 06:46.


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