Raised This Month: $ Target: $400
 0% 

Random model.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-21-2013 , 09:34   Random model.
Reply With Quote #1

How to make that ct would get 1 of 4 models and t would get 1 of 4 models?
Other models:
CT: vip_ct, vip1_ct, vip2_ct, vip3_ct
TR: vip_tr, vip1_tr, vip2_tr, vip3_tr
PHP Code:
public resetModel(idlevelcid
{
    if (
get_user_flags(id) & ADMIN_LEVEL_H
    {
        if (
cs_get_user_team(id) == CS_TEAM_T
        {
            
cs_set_user_model(id"vip_tr")
        }
        else if(
cs_get_user_team(id) == CS_TEAM_CT
        {
            
cs_set_user_model(id"vip_ct")
        }
        else 
        {
            
cs_reset_user_model(id)
        }
    }
    return 
PLUGIN_CONTINUE


Last edited by Unkolix; 02-21-2013 at 09:40.
Unkolix is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 02-21-2013 , 09:50   Re: Random model.
Reply With Quote #2

Quote:
Originally Posted by Unkolix View Post
How to make that ct would get 1 of 4 models and t would get 1 of 4 models?
Other models:
CT: vip_ct, vip1_ct, vip2_ct, vip3_ct
TR: vip_tr, vip1_tr, vip2_tr, vip3_tr
PHP Code:
public resetModel(idlevelcid
{
    if (
get_user_flags(id) & ADMIN_LEVEL_H
    {
        if (
cs_get_user_team(id) == CS_TEAM_T
        {
            
cs_set_user_model(id"vip_tr")
        }
        else if(
cs_get_user_team(id) == CS_TEAM_CT
        {
            
cs_set_user_model(id"vip_ct")
        }
        else 
        {
            
cs_reset_user_model(id)
        }
    }
    return 
PLUGIN_CONTINUE

Code:
if( random_num (0, 4) <= 1)
{
       cs_set_user_model(id, "vip_ct")
} 
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
EDUTz
Senior Member
Join Date: Jun 2010
Location: Dracula's Homeland
Old 02-21-2013 , 19:48   Re: Random model.
Reply With Quote #3

const vip_models[4]
{
vip1,
vip2,
vip3,
vip4
}

cs_set_user_model(id, vip_models[random_num(0, 4)])
EDUTz is offline
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 21:36.


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