Garry's Mod Wiki

Revision Difference

Player:Alive#527176

<function name="Alive" parent="Player" type="classfunc"> <description>Checks if the player is alive.</description> <realm>Shared</realm> <rets> <ret name="" type="boolean">Whether the player is alive</ret> </rets> </function> <example> <description>Loops through all the players and kills alive ones.</description> <code> for i, v in ipairs( player.GetAll() ) do if ( v:Alive() ) then v:Kill() end for i, ply in ipairs( player.GetAll() ) do if ply:Alive() then ply:Kill() end end </code> </example>