Results 1 to 9 of 9

Thread: Player will not take it in!

  1. #1
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts

    Player will not take it in!

    Hi guys, i have a script from RobsoN

    Code:
    	players = getentarray("player", "classname");
    	for(i = 0; i < players.size; i++)
    	{
    		if(winningteam == "tie")
    		{
    			players[i] playSound("end");
    			players[i] iprintlnbold("Game is a tie");
    			players[i] freezeControls(true);
    		}
             ......
             }
    Here will be a player freeze, but now i have saw that if you are while in killcam or you die or die (whatever) you will not take it in to freeze.

    Only if you are alive you will be freeze.

    If you are finished with killcam (spawned again), then all are freezed and you can move xD

    what can i do that all be freeze (killcam break or somethink) and all be 100% freezed?

    Any variables?

    Thank you!

  2. #2
    Private
    Join Date
    Jul 2012
    Posts
    76
    Thanks
    9
    Thanked 56 Times in 38 Posts
    How funny you can move xD

    No, joking apart. Since your English is a little bad I'm not really getting your point.
    Do you want to freeze all players at map end or when exactly? Because if you do, why not block players from spawning? Or spawn them in spectator modus. If you don't want that, why not integrate a new variable which you then can check in the spawn-function.
    Some like:
    PHP Code:
    if(level.winningteam == "tie")
        
    player freezeControls(true); 
    A simple player freezeControls(false); in the spawn function will prevent players from being spawned in a freezed state.

    Edit: Btw. you ask a lot damn questions. It's like 4 pages of threads just by you with 20 threads each. And yesterday malyczolg was blamed for posting every simple problem. It's like I owe that guy an apology.
    Last edited by Peterlankton; 12th July 2013 at 20:55.

  3. #3
    Lieutenant Loveboy's Avatar
    Join Date
    Nov 2012
    Posts
    546
    Thanks
    229
    Thanked 72 Times in 46 Posts
    Sorry for my english, i am not a pro, and sorry that i post really much things, this is right, i am very thanking too all!

    I meant this , look at the VIDEO:

    http://de.xfire.com/video/606279/

    if you looking at this video, i kill myself with a Grenade, WHILE I AM DEATH, I PRESSED F (i build it in script), THEN IT WILL CALL endMap() , SO THAT I MUST NOT WAIT 30 MINUTES . So then, if there stay "Game is a tie" then it should be froze (freeze), but i was not alive, i was on Death, what i can do so that after killcam i will be still froze? I tried with while(1) but that didn't work too.

  4. #4
    Private
    Join Date
    Jul 2012
    Posts
    76
    Thanks
    9
    Thanked 56 Times in 38 Posts
    Just block that players can spawn after endMap() was called. Simple.

  5. #5
    Private
    Join Date
    Nov 2012
    Location
    Denmark, where else
    Posts
    27
    Thanks
    5
    Thanked 13 Times in 6 Posts
    LOL'ed just "self waittill("spawned");"
    simple.

  6. #6
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by Sense View Post
    LOL'ed just "self waittill("spawned");"
    simple.
    No, add a return statement that checks if the map has ended in spawnPlayer() or if you want that the player spawns add the freeze function instead of the return. But you should place the code lower in spawnPlayer() after the player gets spawned.

    PHP Code:
    if(level.mapended)
            return; 
    Last edited by Mitch; 15th August 2013 at 10:50.

  7. #7
    Private
    Join Date
    Nov 2012
    Location
    Denmark, where else
    Posts
    27
    Thanks
    5
    Thanked 13 Times in 6 Posts
    Not sure if i understood it right, but i thought he wanted everyone to be frozen? so if he died while it should happen he obviously couldnt get freezed as he isnt alive, so i thought "self waittill("spawned"); self freezeControls();". but i didnt see the video, might explain...
    Dont drink and drive, smoke and fucking fly

  8. #8
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Sense View Post
    Not sure if i understood it right, but i thought he wanted everyone to be frozen? so if he died while it should happen he obviously couldnt get freezed as he isnt alive, so i thought "self waittill("spawned"); self freezeControls();". but i didnt see the video, might explain...
    The "spawned" flag is a disembodied player - they have spawned into the game, but it's like they are in spectate mode - they don't have a playerbody. If you run the freezecontrols on them at that stage, it will likely not work. You would have to wait till they spawned completely, with a playerbody - so:

    Code:
    self waittill( "spawned_player" );

  9. #9
    Private
    Join Date
    Nov 2012
    Location
    Denmark, where else
    Posts
    27
    Thanks
    5
    Thanked 13 Times in 6 Posts
    Quote Originally Posted by Tally View Post
    The "spawned" flag is a disembodied player - they have spawned into the game, but it's like they are in spectate mode - they don't have a playerbody. If you run the freezecontrols on them at that stage, it will likely not work. You would have to wait till they spawned completely, with a playerbody - so:

    Code:
    self waittill( "spawned_player" );
    True, but you know what i meant
    Dont drink and drive, smoke and fucking fly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •