Raised This Month: $ Target: $400
 0% 

Simple player model. [Please check]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
happy_2012
Senior Member
Join Date: Aug 2012
Old 10-18-2015 , 14:24   Re: Simple player model. [Please check]
Reply With Quote #3

So just this would work?
PHP Code:
#include < amxmodx >
#include < cstrike >
#include < hamsandwich >

new const g_szPlayerModel[][] = { "model_one""model_two" };

public 
plugin_precache()
{
    new 
Path[100];
    for(
Index 0Index sizeof g_szPlayerModelIndex++)
    {
        
formatex(Pathcharsmax(Path), "models/player/%s/%s.mdl"g_szPlayerModel[Index], g_szPlayerModel[Index]);
        
precache_model(Path);
        
        
formatex(Pathcharsmax(Path), "models/player/%s/%sT.mdl"g_szPlayerModel[Index], g_szPlayerModel[Index]);
        if( 
file_exists(Path) )
            
precache_model(Path);
    }
}

public 
plugin_init()
{
    
register_plugin("Model Set""1.0""Chilimax");
    
    
RegisterHam(Ham_Spawn"player""Ham_PlayerSpawn_Post"true);
}

public 
Ham_PlayerSpawn_Post(Index)
{
    if( !
is_user_alive(Index) || !cs_get_user_team(Index) )
        return;
    
    
cs_set_user_model(Indexg_szPlayerModel[random_num(0sizeof g_szPlayerModel)]);

__________________
Discord contacts:
I rarely look at private messages here, but I am very active on Discord!
happy_2012 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:13.


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