Raised This Month: $ Target: $400
 0% 

Cvar by Strings (Or Flags)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 05-19-2010 , 09:10   Re: Cvar by Strings (Or Flags)
Reply With Quote #1

Maybe something like this help.

PHP Code:
new const CT_MODELS[][]
{
    
"models/ct/firstmodel.mdl",
    
"models/ct/secondmodel.mdl",
    
"models/ct/thirdmodel.mdl"
}

public 
plugin_precache()
{
    new 
iNum
    
for (iNum 0iNum sizeof CT_MODELSiNum++)
        
engfunc(EngFunc_PrecacheModelCT_MODELS[iNum])
}

public 
whatever(id)
{
    if(
get_user_team(id) == CS_TEAM_CT)
    {
        
cs_set_user_model(idCT_MODELSrandom(0sizeof CT_MODELS)])
    }

DoviuX is offline
Send a message via Skype™ to DoviuX
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 03:51.


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