Entity

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

Description

Returns the entity with the matching Entity:EntIndex.

Indices 1 through game.MaxPlayers() are always reserved for players.

NOTE In examples on this wiki, Entity( 1 ) is used when a player entity is needed (see wiki editing guide). In singleplayer and listen servers, Entity( 1 ) will always be the first player. In dedicated servers, however, Entity( 1 ) won't always be a valid player.

Arguments

number entityIndex

The entity index.

Returns

Entity

The entity if it exists.
Personal tools
Navigation