Raised This Month: $ Target: $400
 0% 

[HELP] Hostages Hats [Solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 10-12-2009 , 10:48   [HELP] Hostages Hats [Solved]
Reply With Quote #1

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

#define hat "models/admin_head.mdl"

public plugin_precache()
{
    
precache_model(hat)
}

public 
plugin_init() 
{    
    if(
find_ent_by_class(-1"hostage_entity"))
    {
        
register_event("HLTV""event_new_round""a""1=0""2=0")
    }
}

public 
event_new_round()
{
    new 
iEnt find_ent_by_class(-1"hostage_entity")
    
    while(
iEnt 0)
    {
        
entity_set_int(iEntEV_INT_movetypeMOVETYPE_FOLLOW)
        
entity_set_edict(iEntEV_ENT_aimentiEnt)
        
entity_set_model(iEnthat)
        
iEnt find_ent_by_class(iEnt"hostage_entity")
    }

error: http://img240.**************/i/hostage.png/ or http://i35.tinypic.com/1gndjo.png


I tried to put a hat hostages but did not work
Thanks for help

Last edited by dFF; 10-14-2009 at 11:26. Reason: solved!
dFF is offline
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
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 10-14-2009 , 11:19   Re: [HELP] Hostages Hats
Reply With Quote #3

thank you +k

if you could help me out here http://forums.alliedmods.net/showthread.php?t=106356 ..
if you want
dFF 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 22:40.


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