util.IsValidModel

From GMod Wiki

Jump to: navigation, search
Function
Syntax util.IsValidModel( String Model Path )
Where is this used?
Description:
Returns true if model is valid, false if not.
Returns: Boolean IsValidModel
Part of Library: util
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Util.IsValidModel]Util.IsValidModel [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionTypical usage.
Used onNewerShared.png
Code
local boolValid1 = util.IsValidModel( "models/weapons/v_Pistol.mdl" )
Msg( tostring(boolValid1)..", " )
 
local boolValid2 = util.IsValidModel( "banananananana" )
Msg( tostring(boolValid2) )
OutputPrints "true, false" in the console.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox