Entity.IsInWorld

From GMod Wiki

Jump to: navigation, search
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: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.IsInWorld]Entity.IsInWorld [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis will check if player 1 is inside the map.
Used onNewerServer.png
Code
if( player.GetAll()[1]:IsInWorld() ) then
 //He's inside the map boundaries!
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox