Entity.IsInWorld
From GMod Wiki
| Function | |
| Syntax | Entity:IsInWorld( ) |
| Description: | |
| Returns true if the entity is on the map, meaning if it's position is between the map's minimum bounds and maximum bounds, this will return true. It will return false if this is not the case (usually this is caused by entities escaping the map through unfinished areas due to poor level design). | |
| Returns: | Boolean |
| In Object: | Entity |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Entity.IsInWorld]Entity.IsInWorld [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | This will check if player 1 is inside the map. |
|---|---|
| Used on | |
| Code | if( player.GetAll()[1]:IsInWorld() ) then //He's inside the map boundaries! end |
| Output | N/A |