Raised This Month: $ Target: $400
 0% 

[Q]Help With ujbm


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 02-10-2013 , 14:44   [Q]Help With ujbm
Reply With Quote #1

Hello everyone,
i want to add a vip model when the player is ct... but when is ct nothing happens, the default model...

the public player_spawn...

PHP Code:
public player_spawn(id)
{
    static 
CsTeams:team

    
if(!is_user_connected(id))
        return 
HAM_IGNORED
    
    set_pdata_float
(idm_fNextHudTextArgsGameTimeget_gametime() + 999999.0)
    
player_strip_weapons(id)
    if(
g_RoundEnd)
    {
        
g_RoundEnd 0
        g_JailDay
++
    }
    
    
set_user_rendering(idkRenderFxNone000kRenderNormal0)
    
    
set_user_footstepsid);
    
    
set_user_gravityid );    
    
    
clear_bit(g_PlayerWantedid)
    
team cs_get_user_team(id)
    
    if (!
get_bit(g_NoShowShop,id)) cmd_shop(id)
    
    
set_user_godmode(id0)
    
clear_bit(g_PlayerCrowbarid)
    
clear_bit(g_PlayerZMHandsid)
    
set_bit(g_PlayerFist,id)
    
    if(
cs_get_user_team(id) == CS_TEAM_CT && get_user_flags(id) & ADMIN_LEVEL_H)
    { 
        
cs_set_user_model(id"bond"
    }
    
    switch(
team)
    {
        case(
CS_TEAM_T):
        {
            
g_PlayerLast 0
            
if(!g_PlayerReason[id])
                
g_PlayerReason[id] = random_num(16)
            
            
player_hudmessage(id05.0, {2550255}, "%L %L"LANG_SERVER"UJBM_PRISONER_REASON",
            
LANG_SERVERg_Reasons[g_PlayerReason[id]])
            
            
            
//client_infochanged(id)
            
entity_set_int(idEV_INT_body2)
            if (
g_GameMode == 0)
            { 
                
entity_set_int(idEV_INT_skin3)
            }  else
            
/*if(get_bit(g_FreedayAuto, id))
        {            
            freeday_set(0, id)
            clear_bit(g_FreedayAuto, id)
        }
        else*/
    
{
        
entity_set_int(idEV_INT_skinrandom_num(02))
    }
    
    
            
cs_set_user_armor(id0CS_ARMOR_NONE)

}
case(
CS_TEAM_CT):
{
    
    
    
g_PlayerSimon[id]++
    
    
set_user_info(id"model""ujbm_v1")
    
entity_set_int(idEV_INT_body3)
    
cs_set_user_armor(id100CS_ARMOR_VESTHELM)
    
    new 
random_num(1,3)
    switch (
r)
    {
        case 
1:
        {
            
set_hudmessage(25500, -1.0, -1.006.06.0)
            
show_hudmessage(id"%L"LANG_SERVER"UJBM_WARN_FK")
        }
        case 
2:
        {
            
set_hudmessage(02550, -1.00.6006.06.0)
            
show_hudmessage(id"%L"LANG_SERVER"UJBM_WARN_RULES")
        }
        default:
    {
        
set_hudmessage(0212255, -1.00.8006.06.0)
        
show_hudmessage(id"%L"LANG_SERVER"UJBM_WARN_MICR")
    }
}

}
}




    if (
g_GameMode == || g_GameMode == 5)
{
    
if (
cs_get_user_team(id) == CS_TEAM_CT)
{

set_bit(g_BackToCTid)
cs_set_user_team2(idCS_TEAM_T)
}

new 
0;            
strip_user_weapons(id)
random_num(0sizeof(_WeaponsFree) - 1)    
give_item(id"weapon_knife")
give_item(id_WeaponsFree[j])
cs_set_user_bpammo(id_WeaponsFreeCSW[j], _WeaponsFreeAmmo[j])

}


    return 
HAM_IGNORED

i also tried to add this on a different plugin but again the default model... please help.... i'm an amateur on amxx scripting....
oxygen935 is offline
Send a message via Skype™ to oxygen935
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-10-2013 , 14:47   Re: [Q]Help With ujbm
Reply With Quote #2

Have you precashed the model?
f.e.
PHP Code:
public plugin_precache() 
{
    
precache_model("models/player/adminash_ct/adminash_ct.mdl")
    
precache_model("models/player/adminash_t/adminash_t.mdl")

    return 
PLUGIN_CONTINUE


Last edited by Unkolix; 02-10-2013 at 14:49.
Unkolix is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 02-10-2013 , 14:48   Re: [Q]Help With ujbm
Reply With Quote #3

haha man i'm not so noob, i precashed the model...

p.s. yes exactly like that (the same folder and model name)

Last edited by oxygen935; 02-10-2013 at 14:53.
oxygen935 is offline
Send a message via Skype™ to oxygen935
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 02-10-2013 , 14:56   Re: [Q]Help With ujbm
Reply With Quote #4

~~~ SORRy, DELETE THIS!~~

Last edited by oxygen935; 02-10-2013 at 14:57.
oxygen935 is offline
Send a message via Skype™ to oxygen935
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 02-10-2013 , 14:57   Re: [Q]Help With ujbm
Reply With Quote #5

could i try with something like that??

PHP Code:
new vipmodel[ ]        = "models/player/bond/bond";

public 
plugin_precache()
{
        
precache_model(vipmodel)

        return 
PLUGIN_CONTINUE
}  

public 
player_spawn(id

    if(
cs_get_user_team(id) == CS_TEAM_CT && get_user_flags(id) & ADMIN_LEVEL_H
    {  
        
cs_set_user_model(idvipmodel)  
    } 

oxygen935 is offline
Send a message via Skype™ to oxygen935
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-10-2013 , 14:58   Re: [Q]Help With ujbm
Reply With Quote #6

Don't make multiple posts!!! You can use edit button on the right top corner of your post!
Unkolix is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 02-10-2013 , 15:14   Re: [Q]Help With ujbm
Reply With Quote #7

i'm really sorry i don't think it..., but could use the mode i told with the " new vipmode[ ]" ??
oxygen935 is offline
Send a message via Skype™ to oxygen935
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 20:40.


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