Alive or not could be the question! in multi-player, missions come with respawn module(s). When a player is dead shot, alive player will return false, then almost immediately true if the "revive" respawn template is enabled, then could turn to false again if time for assistance is elapsed or if the player activates the respawn menu before; and finally true after player respawns.
Just be aware that in that case (respawn + revive enabled), the status of the player is toggling: true → false → true → false → true. Then, alive status while player is waiting for being rescued could lead to some script errors as player is supposed to be alive but is in limbo and the dead entity "player" gets passed to server.
Description
Check if given vehicle/person/building is alive (i.e. not dead or destroyed).
Syntax
alive object
Parameters:
object: Object
Returns: Boolean - true if alive, false if dead/destroyed
Examples
Example 1
SQS:
? not alive player : exit
Example 2
SQF:
if (!alive player) exitWith {};
Example 3
alive objNull; // returns false
See also
setDamage · damage · waterDamaged