Maybe you added it wrong?
Look Like this:
onPlayerSpawned()
{
self endon("disconnect");
for(;
{
self waittill("spawned_player");
self thread SelectClass();
self thread doDvars();
}
}
hello, i'm building a mod and i tried to do this:
then, i've written in "onplayerspawned":Code:selectClass() { self hide(); self freezeControls(true); self VisionSetNakedForPlayer("black_bw", 0); }
but it didn't work..Code:self thread selectClass();
help?
Last edited by testy; 04-13-2011 at 06:42 AM.
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:
And add to OnPlayerSpwawned() OR doDvars()SelectClass()
{
self endon("disconnect");
self freezeControls(true);
self hide();
self VisionSetNakedForPlayer( "black_bw", 0 );
}
doDvars():
OnPlayerSpawned():doDvars()
{
self thread SelectClass();
}
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?
Last edited by Jorndel; 04-13-2011 at 08:10 AM.
u is forgetting the death, remember this thread is called from onPlayerSpawn:
All codeCode:self waittill("death");
Try, and put here the resultCode:SelectClass() { self endon("disconnect"); self endon("death"); for(;;) { self freezeControls(true); self hide(); self VisionSetNakedForPlayer( "black_bw", 0 ); } }
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....