AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Helmet (https://forums.alliedmods.net/showthread.php?t=342836)

XPERA 05-20-2023 10:17

Helmet
 
1 Attachment(s)
terrorist team red helmet ct team green helmet attachment as in the picture
is there an addon

DruGzOG 05-20-2023 11:49

Re: Helmet
 
If you have the models, should be easy to do so

XPERA 05-20-2023 12:52

Re: Helmet
 
1 Attachment(s)
Something like that

XPERA 05-21-2023 12:32

Re: Helmet
 
Quote:

Originally Posted by DruGzOG (Post 2804721)
If you have the models, should be easy to do so

Could you

DruGzOG 05-26-2023 07:18

Re: Helmet
 
Quote:

Originally Posted by XPERA (Post 2804765)
Could you

PHP Code:

#include < amxmodx >
#include < engine >
#include < cstrike >
#include < hamsandwich >

new const g_szHatModelCsTeams ][ ] = {
    
"",
    
"models/barret/t.mdl",
    
"models/barret/ct.mdl",
    
""
};

new 
g_iHats33 ];

public 
plugin_init( ) {
   
    
register_event"TeamInfo""EventTeamInfo""a" );
    
    
RegisterHamHam_Spawn"player""FwdHamPlayerSpawn");
}

public 
plugin_precache( ) {
  
    
precache_modelg_szHatModelCS_TEAM_T ] );
    
precache_modelg_szHatModelCS_TEAM_CT ] );
}

public 
client_disconnectid )
    if( 
is_valid_entg_iHatsid ] ) )
        
remove_entityg_iHatsid ] );

public 
FwdHamPlayerSpawn( const id ) {
    if( 
is_user_aliveid ) ) {
        new 
iEntity g_iHatsid ];
        
        if( !
is_valid_entiEntity ) ) {
            if( !( 
iEntity g_iHatsid ] = create_entity"info_target" ) ) )
                return;
            
            new 
CsTeams:iTeam cs_get_user_teamid );
            
            if( 
iTeam != CS_TEAM_T && iTeam != CS_TEAM_CT )
                
iTeam CS_TEAM_T;
            
            
entity_set_modeliEntityg_szHatModeliTeam ] );
            
entity_set_intiEntityEV_INT_movetypeMOVETYPE_FOLLOW );
            
entity_set_edictiEntityEV_ENT_aimentid );
        }
    }
}

public 
EventTeamInfo( ) {
    new 
id read_data), iEntity g_iHatsid ];
    
    if( !
is_valid_entiEntity ) ) {
        if( 
iEntity )
            
g_iHatsid ] = 0;
        
        return;
    }
    
    new 
szTeam];
    
read_data2szTeam);
    
    if( 
szTeam] == 'C' )
        
entity_set_modeliEntityg_szHatModelCS_TEAM_CT ] );
    else
        
entity_set_modeliEntityg_szHatModelCS_TEAM_T ] );


Based of xPaw's Santa hat

XPERA 05-26-2023 10:59

Re: Helmet
 
Thanks

DruGzOG


All times are GMT -4. The time now is 00:32.

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