Raised This Month: $ Target: $400
 0% 

set_entity_visibility


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KamiN
Senior Member
Join Date: Jun 2011
Old 12-08-2011 , 09:43   set_entity_visibility
Reply With Quote #1

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 )

}

Last edited by KamiN; 12-08-2011 at 13:53.
KamiN is offline
 



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 11:49.


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