Raised This Month: $ Target: $400
 0% 

set_entity_visibility


Post New Thread Reply   
 
Thread Tools Display Modes
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
KamiN
Senior Member
Join Date: Jun 2011
Old 12-08-2011 , 13:41   Re: set_entity_visibility
Reply With Quote #2

Anybody is up for help? O.o
KamiN is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-08-2011 , 13:45   Re: set_entity_visibility
Reply With Quote #3

set_entity_visibility ( id, 1.0 )

->

set_entity_visibility ( id, 1 )

...
__________________
You can do anything you set your mind to, man.

Devil259 is offline
KamiN
Senior Member
Join Date: Jun 2011
Old 12-08-2011 , 13:52   Re: set_entity_visibility
Reply With Quote #4

Still doesnt works..
KamiN is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-08-2011 , 14:56   Re: set_entity_visibility
Reply With Quote #5

Quote:
Originally Posted by KamiN View Post
Still doesnt works..
That was not the only error.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
KamiN
Senior Member
Join Date: Jun 2011
Old 12-08-2011 , 15:23   Re: set_entity_visibility
Reply With Quote #6

Quote:
Originally Posted by Devil259 View Post
That was not the only error.
So can u tell me how to make it work properly?
KamiN is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 12-08-2011 , 14:09   Re: set_entity_visibility
Reply With Quote #7

set_user_rendering ( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0 )

back to visible

set_user_rendering ( id )
.Dare Devil. is offline
KamiN
Senior Member
Join Date: Jun 2011
Old 12-08-2011 , 14:16   Re: set_entity_visibility
Reply With Quote #8

Quote:
Originally Posted by .Dare Devil. View Post
set_user_rendering ( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0 )

back to visible

set_user_rendering ( id )


If players use SOFTWARE renderer they can see "invisible" CTs, thats why im trying to make CT's invisible someother way
KamiN is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-08-2011 , 14:36   Re: set_entity_visibility
Reply With Quote #9

Use kRenderTransColor instead.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 12-08-2011 , 15:26   Re: set_entity_visibility
Reply With Quote #10

Quote:
Originally Posted by ConnorMcLeod View Post
Use kRenderTransColor instead.
So replace

set_entity_visibility (i, 0)

by

set_user_rendering(i, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0)
__________________
You can do anything you set your mind to, man.

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


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