Raised This Month: $12 Target: $400
 3% 

Player Spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ShufflexDD
Senior Member
Join Date: Apr 2011
Location: :noitaɔo˩
Old 07-24-2011 , 16:34   Player Spawn
Reply With Quote #1

Why I can't set player alpha when he is spawn?
Code:
public event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
SetEntityRenderColor(client, 255, 255, 255, 50);
}
__________________

⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.
ShufflexDD is offline
Send a message via ICQ to ShufflexDD Send a message via Skype™ to ShufflexDD
Monkeys
Veteran Member
Join Date: Jan 2010
Old 07-24-2011 , 21:29   Re: Player Spawn
Reply With Quote #2

EventHookMode_Post and be sure to READ your client first. :/
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
ShufflexDD
Senior Member
Join Date: Apr 2011
Location: :noitaɔo˩
Old 07-25-2011 , 08:08   Re: Player Spawn
Reply With Quote #3

Quote:
Originally Posted by Monkeys View Post
be sure to READ your client first. :/
how to do it?
__________________

⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.
ShufflexDD is offline
Send a message via ICQ to ShufflexDD Send a message via Skype™ to ShufflexDD
Monkeys
Veteran Member
Join Date: Jan 2010
Old 07-25-2011 , 08:34   Re: Player Spawn
Reply With Quote #4

new client = GetClientOfUserId(GetEventInt(event, "userid"));
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
ShufflexDD
Senior Member
Join Date: Apr 2011
Location: :noitaɔo˩
Old 07-25-2011 , 08:49   Re: Player Spawn
Reply With Quote #5

Code:
public OnPluginStart()
{
	HookEvent("player_spawn", event_PlayerSpawn, EventHookMode_Post);
}

public event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	SetEntityRenderColor(client, 255, 255, 255, 50);
}
not working =(
__________________

⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈⇈
Check this website and find out how many functions
it has working with game server together.
ShufflexDD is offline
Send a message via ICQ to ShufflexDD Send a message via Skype™ to ShufflexDD
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-25-2011 , 09:14   Re: Player Spawn
Reply With Quote #6

HookEvent defaults to EventHookMode_Post, so that wasn't necessary. Try using a timer inside the event callback to see if maybe it's being reset after you change the player's color.
bl4nk is offline
meng
Veteran Member
Join Date: Oct 2005
Location: us
Old 07-26-2011 , 00:47   Re: Player Spawn
Reply With Quote #7

Also try adding SetEntityRenderMode before making your changes. Not sure which you need. RENDER_TRANSADD?
__________________
.
[ 1 Dumerils Boa | 1 Cali King ]...
.
I'm a lil' spirituous.
meng is offline
Send a message via Yahoo to meng
Monkeys
Veteran Member
Join Date: Jan 2010
Old 07-26-2011 , 08:15   Re: Player Spawn
Reply With Quote #8

RENDER_TRANSCOLOR worked for me in the past.
__________________
Get a lid on that zombie,
he's never gonna be alri-i-ight.
Oooh get a lid on that zombie,
or he's gonna feed all night.
Monkeys is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 07-26-2011 , 08:18   Re: Player Spawn
Reply With Quote #9

Quote:
Originally Posted by Monkeys View Post
RENDER_TRANSCOLOR worked for me in the past.
yep, same here
__________________
napalm00 is offline
Reply


Thread Tools
Display Modes

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:35.


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