Player/Alive

From Garry's Mod
Jump to: navigation, search
 Player:Alive( )

Contents

Description

Checks if the player is alive.

Returns

boolean

Whether the player is alive

Examples

Example

Loops through all the players and kills alive ones.

for k, v in pairs( player.GetAll() ) do
   if ( v:Alive() ) then
      v:Kill()
   end
end


Personal tools
Navigation