Garry's Mod Wiki

Entity

Entity Entity( number entityIndex )

Description

Returns the entity with the matching Entity:EntIndex.

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

In examples on this wiki, Entity( 1 ) is used when a player entity is needed (see ). 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

1 number entityIndex
The entity index.

Returns

1 Entity
The entity if it exists, or NULL if it doesn't.

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 4
Generate Html 7
SaveChanges (1) 9
Render Body 0
Render Sidebar 11