Raised This Month: $ Target: $400
 0% 

Random player model?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 01-11-2009 , 15:43   Re: Random player model?
Reply With Quote #2

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

new g_ct_models[][] =
{
    
"models/player/chicken/chicken.mdl",
    
"models/player/homersimpson/homersimpson.mdl",
    
"models/player/futbender/futbender.mdl"
};

new 
g_maxplayers;

public 
plugin_init()
{
    
register_event"HLTV""hook_newround""a""1=0""2=0" );
    
g_maxplayers get_maxplayers();
}

public 
plugin_precache()
{
    for( new 
0sizeof g_ct_modelsi++ )
        
precache_modelg_ct_models] );
}

public 
hook_newround()
{
    new 
x;
    for( new 
1<= g_maxplayersi++ )
    {
        if( !
is_user_alive) )
            continue;
            
        
random_num0sizeof g_ct_models );
        
cs_set_user_modelig_ct_models] );
    }

__________________

anakin_cstrike 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 01:43.


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