Entity.IsConstrained

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:IsConstrained( )
Description:
Returns true if the entity has constraints attached to it.
Returns: Boolean IsConstrained
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.IsConstrained]Entity.IsConstrained [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionIf the entity gets any constraints, it will remove.
Used onNewerServer.png
Code
function DontConstrainMe()
     if(self:IsConstrained( ) == true) then
          self:Remove()
     end
end
OutputThe entity is now removed.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox