Garry's Mod Wiki

net.ReadEntity

  Entity net.ReadEntity()

Description

Reads an entity from the received net message. You should always check if the specified entity exists as it may have been removed and therefore NULL if it is outside of the players PVS (Potential Visibility Set) or was already removed.

You must read information in same order as you write it.

Returns

1 Entity
The entity, or nil if no entity could be read.