Author Topic: Why doesn't this work?  (Read 2322 times)

Code: [Select]
function gameConnection::spawnPlayer(%this)
{
Parent::spawnPlayer(%this);
if($PH::HunterBlindValue == true && %this.tdmTeam == 0)
{
%this.player.ApplyBlinders(true);
}
}
It's in the package, and I guarantee $PH::HunterBlindValue is true when hunters are blind. %this.tdmTeam is also 0 when they're a hunter.

Am I missing something?

i know package is case sensitive

is parent?

and what is the problem?

i know package is case sensitive

is parent?

and what is the problem?
It's in a working package.

The problem is it doesn't blind you.

It's in a working package.

The problem is it doesn't blind you.
are you sure applyBlinders works?

also isn't %this already the player?

so it would be %this.applieetc

are you sure applyBlinders works? Yes, it's being used for blinding already.

also isn't %this already the player? No, gameConnection = client.

so it would be %this.applieetc

Code: [Select]
function gameConnection::spawnPlayer(%this)
{
Parent::spawnPlayer(%this);
if($PH::HunterBlindValue == true && %this.tdmTeam == 0)
{
%this.player.ApplyBlinders(true);
}
}
It's in the package, and I guarantee $PH::HunterBlindValue is true when hunters are blind. %this.tdmTeam is also 0 when they're a hunter.

Am I missing something?

Are you using Slayer? %client.tdmTeam is an old Team Deathmatch field.

If those don't work try echoing those 2 values that you are checking for and tell us the results. Also inside the statement put something like echo("Applying Blinders");.
« Last Edit: September 30, 2013, 11:10:39 PM by Scriode »

Are you using Slayer? %client.tdmTeam is an old Team Deathmatch field.
But it's been working, I swear to god. I can dump any prop and their tdmTeam will be 1; I can dump any hunter and their tdmTeam will be 0.

did you try delaying it 3 seconds

But it's been working, I swear to god. I can dump any prop and their tdmTeam will be 1; I can dump any hunter and their tdmTeam will be 0.
But you're using slayer and not tdm so why aren't you using the slayer value

But you're using slayer and not tdm so why aren't you using the slayer value
I don't have any other team deathmatch mods, Slayer sets that variable for some reason.

What's the other variable?

I don't have any other team deathmatch mods, Slayer sets that variable for some reason.

What's the other variable?
%client.slyrteam.name $= "hunters"