Raised This Month: $ Target: $400
 0% 

[Help] How to get this Event?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-20-2010 , 11:43   Re: [Help] How to get this Event?
Reply With Quote #5

Quote:
Originally Posted by hleV View Post
You should also kill the entity
Code:
entity_set_int(Ent, EV_INT_flags, FL_KILLME);
Buy or pickup a primary weapon and then say "hi". Test again with SetHamReturnInteger( 0 ) and return HAM_SUPERCEDE commented out.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

new g_iWeaponEnt;

public 
plugin_init()
{
    
RegisterHamHam_AddPlayerItem "player" "fw_HamAddPlayerItem" );
    
    
register_clcmd"say hi" "TestFunc" );
}

public 
fw_HamAddPlayerItemid iWeapon )
{
    if( 
ExecuteHamHam_Item_ItemSlot iWeapon ) == )
    {
        
g_iWeaponEnt iWeapon;
        
        
client_printid print_chat "Primary weapon blocked" );
        
        
SetHamReturnInteger);
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;
}  

public 
TestFuncid )
{
    
client_printid print_chat "Weapon Exists ? %s" pev_validg_iWeaponEnt ) ? "true" "false" );

__________________

Last edited by Bugsy; 11-20-2010 at 11:51.
Bugsy 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 11:22.


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