|
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
|

02-10-2013
, 14:44
[Q]Help With ujbm
|
#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(id, m_fNextHudTextArgsGameTime, get_gametime() + 999999.0)
player_strip_weapons(id)
if(g_RoundEnd)
{
g_RoundEnd = 0
g_JailDay++
}
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
set_user_footsteps( id, 0 );
set_user_gravity( id );
clear_bit(g_PlayerWanted, id)
team = cs_get_user_team(id)
if (!get_bit(g_NoShowShop,id)) cmd_shop(id)
set_user_godmode(id, 0)
clear_bit(g_PlayerCrowbar, id)
clear_bit(g_PlayerZMHands, id)
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(1, 6)
player_hudmessage(id, 0, 5.0, {255, 0, 255}, "%L %L", LANG_SERVER, "UJBM_PRISONER_REASON",
LANG_SERVER, g_Reasons[g_PlayerReason[id]])
//client_infochanged(id)
entity_set_int(id, EV_INT_body, 2)
if (g_GameMode == 0)
{
entity_set_int(id, EV_INT_skin, 3)
} else
/*if(get_bit(g_FreedayAuto, id))
{
freeday_set(0, id)
clear_bit(g_FreedayAuto, id)
}
else*/
{
entity_set_int(id, EV_INT_skin, random_num(0, 2))
}
cs_set_user_armor(id, 0, CS_ARMOR_NONE)
}
case(CS_TEAM_CT):
{
g_PlayerSimon[id]++
set_user_info(id, "model", "ujbm_v1")
entity_set_int(id, EV_INT_body, 3)
cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
new r = random_num(1,3)
switch (r)
{
case 1:
{
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 6.0)
show_hudmessage(id, "%L", LANG_SERVER, "UJBM_WARN_FK")
}
case 2:
{
set_hudmessage(0, 255, 0, -1.0, 0.60, 0, 6.0, 6.0)
show_hudmessage(id, "%L", LANG_SERVER, "UJBM_WARN_RULES")
}
default:
{
set_hudmessage(0, 212, 255, -1.0, 0.80, 0, 6.0, 6.0)
show_hudmessage(id, "%L", LANG_SERVER, "UJBM_WARN_MICR")
}
}
}
}
if (g_GameMode == 4 || g_GameMode == 5)
{
if (cs_get_user_team(id) == CS_TEAM_CT)
{
set_bit(g_BackToCT, id)
cs_set_user_team2(id, CS_TEAM_T)
}
new j = 0;
strip_user_weapons(id)
j = random_num(0, sizeof(_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....
|
|