Raised This Month: $ Target: $400
 0% 

Optimizing - Remove dropped weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 06-27-2009 , 13:27   Re: Optimizing - Remove dropped weapons
Reply With Quote #4

Lol .. Making weapon think, engine removes it self
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define REMOVE_TIME 20.0

public plugin_init( ) {
    
register_forwardFM_SetModel"FwdSetModel");
}

public 
FwdSetModeliEntity ) {
    if( !
pev_validiEntity ) )
        return;
    
    static const 
szWeaponbox[] = "weaponbox";
    static 
szClassname10 ]; // weaponbox
    
peviEntitypev_classnameszClassnamecharsmaxszClassname ) );
    
    if( 
equalszClassnameszWeaponbox ) )
        
set_peviEntitypev_nextthinkget_gametime( ) + REMOVE_TIME );

__________________

Last edited by xPaw; 06-27-2009 at 14:32.
xPaw is offline
 



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 15:27.


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