Results 1 to 6 of 6
  1. #1
    testy's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    1
    My Mood
    Happy

    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?
    Last edited by testy; 04-13-2011 at 06:42 AM.

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Maybe you added it wrong?

    Look Like this:

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

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    I think it's:
    self freezeControls();

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    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?
    Last edited by Jorndel; 04-13-2011 at 08:10 AM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    sdm's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    169
    Reputation
    10
    Thanks
    8
    My Mood
    Angelic
    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

  6. #6
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    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....

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A