Jump to content
Sign in to follow this  
Zombitch

Respawn one of the players in MP

Recommended Posts

Hi,

I know there is a forceRespawn function that works great.

But my question is, how to choose the player I want to respawn. I mean, let's say I have a MP server where these players play (it's there nickname) :

- Alan

- Max

- Paprika

- PapaBear

How can I script / said "respawn PapaBear" on server side. I tried to write :

forceRespawn PapaBear

But it did not do anything.

Thanks for your help.

Share this post


Link to post
Share on other sites

forceRespawn works only with local units\players, you'll need to send them a public variable to trigger forceRespawn.

init.sqf:

"forceRespawnMe" addPublicVariableEventHandler {
   forceRespawn player;
};

Somewhere on server:

(owner PapaBear) publicVariableClient "forceRespawnMe";

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×