I'm having a jailbreak "Days menu" plugin and i decited to make a new day called "invisibility day" in witch CT's becomes invisible and have to kill T's
Heres the code of it
Code:
case DAY_INVIS:
{
if(IsPlayer(i) && is_user_alive(i))
{
switch(cs_get_user_team(i))
{
case CS_TEAM_T:
{
........
}
case CS_TEAM_CT:
{
...................
set_entity_visibility (i, 0)
...................
}
}
}
}
.......................
}
When time is 0:00 i want CT's to become visible again so i use this code, but it doesnt work, CTs are still invisible, why? O.o
Code:
#define TASK_timeup 934279423
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
public event_round_start()
{
set_task(float(floatround(get_pcvar_float(g_pcvar_mp_roundtime) * 60.0, floatround_floor)), "time_is_up", TASK_timeup)
}
public time_is_up(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id))
set_entity_visibility ( id, 1 )
}