OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Zipper5 on 17 Aug 2008, 14:23:07

Title: How to stop abuse of respawns
Post by: Zipper5 on 17 Aug 2008, 14:23:07
Hey guys,

I currently have a friend who's working on a multiplayer mission where he's discovered that people have abused the fact that instead of waiting to respawn, they just go back to the lobby and join back in. Is there any way to stop this from happening?

Thanks.

Edit: This should really have gone into the multiplayer editing section... Sorry. Please move.
Title: Re: How to stop abuse of respawns
Post by: Spooner on 17 Aug 2008, 15:20:42
I think you might be able to use onPlayerDisconnected and record the time when a player leaves (using _id, so they can't just change name and reconnect). Then, check in onPlayerConnected to see if they are either new, or have disconnected more than 2 minutes ago. If too long, stop them doing anything, say by setPosing them in place until the time they would have respawned. They can still escape out of the game then (disableUserInput is always rude).

A simpler alternative would be to prevent anyone from doing anything when they start, so relogging wouldn't actually be faster. Even easier is to just kill them in init.sqf ;P I know this sounds draconian, but players can still use the map, plan and communicate when they are in this "dead" phase.

EDIT: Realised I suggested something that couldn't work. Provided an alternative.