why it doesn't work?

Posts 1–6 of 6 · Page 1 of 1
why it doesn't work?
hello, i'm building a mod and i tried to do this:
Code:
selectClass()
{
	self hide();
	self freezeControls(true);
	self VisionSetNakedForPlayer("black_bw", 0);
}
then, i've written in "onplayerspawned":
Code:
self thread selectClass();
but it didn't work..
help?
Maybe you added it wrong?

Look Like this:

onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread SelectClass();
self thread doDvars();
}
}
I think it's:
self freezeControls();
Nope. cuse if he set it to true. It will make the command active. If false. It will unfreeze hes controls when the game starts and he can move then the timer show. Battle stats in ??....

So not that..

Okey. Will post how It would look then:

As thread:

SelectClass()
{
self endon("disconnect");

self freezeControls(true);
self hide();
self VisionSetNakedForPlayer( "black_bw", 0 );
}
And add to OnPlayerSpwawned() OR doDvars()

doDvars():
doDvars()
{
self thread SelectClass();
}
OnPlayerSpawned():
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread SelectClass();
self thread doDvars();
}
}

But, remember:
If you have anything else in the GSC _rank file that may be damaged or worong.,That also may be the problem.

How to easy find an error:

You take an backup of the _rank.gsc
Then you remove all the Threads you made.
Then you add one by one after you try it in-game.
Then you easy see what thread that makes the error..

Hope it helps

Dose it work?
u is forgetting the death, remember this thread is called from onPlayerSpawn:
Code:
self waittill("death");
All code
Code:
SelectClass()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self freezeControls(true);
self hide();
self VisionSetNakedForPlayer( "black_bw", 0 );
}
}
Try, and put here the result
Question. Why keep repiting the code?

Will just make error and overflow command.

And why I removed death. Cuse I suppose he is amking an menu or something. So then It would be wird for it to end on death.

Also, since the freze is true. He will be stuck forever....
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?