Raised This Month: $ Target: $400
 0% 

Set mdl by saved value


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GarbageBox
Senior Member
Join Date: Feb 2010
Old 08-10-2012 , 12:00   Set mdl by saved value
Reply With Quote #1

The original plugin only have one mdl and now I added few more, but I don't know how to set the mdl to player.
I want to set mdl depends on szSetHatID, just some numbers, 1 to 3.
PHP Code:
new MODEL_MARK[ ][ ]     ={
    
"models/test/1.mdl",
    
"models/test/2.mdl",
    
"models/test/3.mdl"
}

public 
plugin_precache( )
{
    for( new 
0sizeof MODEL_MARKi++ )
        
precache_modelMODEL_MARK] );
}

public 
client_PreThinkid )
{
    new 
szAuthID32 ];
    
get_user_authididszAuthIDsizeof szAuthID );
    
    
formatexszKeysizeof szKey 1"%s"szAuthID );
    
    if( 
nvault_getg_nVaultszKeyszGetHatIDsizeof szGetHatID ) )
    {
        
formatexszSetHatIDsizeof szSetHatID 1"%s"szGetHatID );
        
        
//client_print_color( id, DontChange, "^1%s ^4#%s already set for you^1.", PREFIX, szSetHatID ); 

        //...
        
if(g_adminmarkEnt[id] < 1)
        {
            
g_adminmarkEnt[id] = create_entity("info_target")
            if(
g_adminmarkEnt[id] > 0)
            {
                
entity_set_int(g_adminmarkEnt[id], EV_INT_movetypeMOVETYPE_FOLLOW)
                
entity_set_edict(g_adminmarkEnt[id], EV_ENT_aimentid)
                
entity_set_model(g_adminmarkEnt[id],MODEL_MARK)   //<--Here            
            
}
        }
        
//...

__________________
You can be a SUPER coder but you Haven't to say such as "stupid, etc." words to the others

Last edited by GarbageBox; 08-10-2012 at 12:18.
GarbageBox is offline
 


Thread Tools
Display Modes

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 05:48.


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