PDA

View Full Version : Player will not take it in!



Loveboy
12th July 2013, 19:39
Hi guys, i have a script from RobsoN



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!

Peterlankton
12th July 2013, 20:47
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:


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.

Loveboy
12th July 2013, 21:39
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.

Peterlankton
12th July 2013, 22:56
Just block that players can spawn after endMap() was called. Simple.

Sense
15th August 2013, 06:22
LOL'ed just "self waittill("spawned");"
simple.

Mitch
15th August 2013, 10:47
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.



if(level.mapended)
return;

Sense
15th August 2013, 16:23
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...

Tally
15th August 2013, 16:48
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:


self waittill( "spawned_player" );

Sense
15th August 2013, 17:53
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:


self waittill( "spawned_player" );

True, but you know what i meant