Raised This Month: $51 Target: $400
 12% 

[REQ] xMas Hats Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 12-02-2016 , 08:12   [REQ] xMas Hats Help
Reply With Quote #1

Hello i need to fix a christmas plugin hats for ct and t team. i've added 4 hats skins and the plugin make complier error.
The errors are below:
xmashats1.sma(10) : error 018: initialization data exceeds declared size
xmashats1.sma(13) : error 010: invalid function or declaration


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

new const g_szHatModelCsTeams ][ ] = {
    
"",
    
"models/craciun/fun/santahat_T1.mdl",
    
"models/craciun/fun/santahat_T2.mdl",
    
"models/craciun/fun/santahat_CT1.mdl",
    
"models/craciun/fun/santahat_CT2.mdl",
    
""
};

new 
g_iHats33 ];

public 
plugin_init( ) {
    
register_plugin"Santa Hat + Snow""1.3""xPaw" );
    
    
register_cvar"santa_hat""1.3"FCVAR_SERVER );
    
    
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 ] );

eNNkds is offline
Send a message via Skype™ to eNNkds
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-02-2016 , 08:53   Re: [REQ] xMas Hats Help
Reply With Quote #2

You can't just add the hats and expect the plugin to magically know which of them are for which team. You can only add 3 different hats (one for each team) because it's limited to the number of teams (CT/T/Spec).
__________________

Last edited by OciXCrom; 12-02-2016 at 16:57.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 12-02-2016 , 16:00   Re: [REQ] xMas Hats Help
Reply With Quote #3

I'm expected to use 2 diferent models on each team. nothing special.. don't understimate me for that. that why i request for help.
eNNkds is offline
Send a message via Skype™ to eNNkds
eNNkds
Member
Join Date: Sep 2012
Location: Romania
Old 12-04-2016 , 03:51   Re: [REQ] xMas Hats Help
Reply With Quote #4

bump
eNNkds is offline
Send a message via Skype™ to eNNkds
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 12:11.


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