Raised This Month: $ Target: $400
 0% 

[HELP] Hostages Hats [Solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-12-2009 , 14:14   Re: [HELP] Hostages Hats
Reply With Quote #2

The hats on hostages are completely bugged, but here is working version

PHP Code:
#include < amxmodx >
#include < engine >

new const g_szHat[ ] = "models/jamaicahat.mdl";

public 
plugin_init( ) {
    
register_plugin"Hostages Hats""1.0""xPaw" );
    
    new 
iEntitybool:bFound;
    
    while( ( 
iEntity find_ent_by_classiEntity"hostage_entity" ) ) > ) {
        if( !
bFound ) {
            
bFound true;
            
            
register_event"HLTV""EventNewRound""a""1=0""2=0" );
        }
        
        
CreateHatiEntity );
    }
}

public 
plugin_precache( )
    
precache_modelg_szHat );

public 
EventNewRound( ) {
    new 
iEntity;
    
    while( ( 
iEntity find_ent_by_classiEntity"hostage_entity" ) ) > )
        if( !
is_valid_ententity_get_intiEntityEV_INT_iuser1 ) ) )
            
CreateHatiEntity );
}

CreateHat( const iHostage ) {
    new 
iEntity create_entity"info_target" );
    
    if( !
is_valid_entiEntity ) )
        return 
0;
    
    
entity_set_intiHostageEV_INT_iuser1iEntity );
    
entity_set_intiEntityEV_INT_movetypeMOVETYPE_FOLLOW );
    
entity_set_edictiEntityEV_ENT_aimentiHostage );
    
entity_set_modeliEntityg_szHat );
    
    return 
iEntity;

__________________
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 22:40.


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