PHP Code:
RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn_Post", true)
}
public CBasePlayer_Spawn_Post(id)
{
if( is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T )
{
give_item(id, "weapon_c4")
cs_set_user_plant_ext(id, 1, 1, 255, 255, 0)
cs_set_user_submodel(id, 1)
}
}
cs_set_user_plant_ext(index, plant = 1, showbombicon = 1, r=0, g=160, b=0)
{
if( !plant || !showbombicon || (!r && !b && g==160) )
{
return cs_set_user_plant(index, plant, showbombicon)
}
if( cs_set_user_plant(index, plant, 0) )
{
static iStatusIcon = 0
if( !iStatusIcon )
{
iStatusIcon = get_user_msgid("StatusIcon")
}
message_begin(MSG_ONE, iStatusIcon, .player=index)
write_byte(1) // show
write_string("c4")
write_byte(r)
write_byte(g)
write_byte(b)
message_end()
return 1
}
return 0
}
__________________