Global/IsUselessModel

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
|Name=IsUselessModel
 
|Name=IsUselessModel
 
|Parent=Global
 
|Parent=Global
|Description={{NextUpdate}}Returns whether or not a model is useless by checking that the file path is that of a proper model.
+
|Description=Returns whether or not a model is useless by checking that the file path is that of a proper model.
  
 
If the string ".mdl" is not found in the model name, the function will return true.
 
If the string ".mdl" is not found in the model name, the function will return true.
Line 21: Line 21:
 
* "gestures_"
 
* "gestures_"
 
* "shared_ragdoll_"
 
* "shared_ragdoll_"
|Realm=Shared
+
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
 
|File=lua/includes/util.lua
 
|File=lua/includes/util.lua
|Line=221-243
+
|Line=261-275
 
}}
 
}}
 
{{Arg
 
{{Arg

Latest revision as of 21:39, 21 February 2019

 IsUselessModel( )

Description

Returns whether or not a model is useless by checking that the file path is that of a proper model.

If the string ".mdl" is not found in the model name, the function will return true.

The function will also return true if any of the following strings are found in the given model name:

  • "_gesture"
  • "_anim"
  • "_gst"
  • "_pst"
  • "_shd"
  • "_ss"
  • "_posture"
  • "_anm"
  • "ghostanim"
  • "_paths"
  • "_shared"
  • "anim_"
  • "gestures_"
  • "shared_ragdoll_"

Arguments

string modelName

The model name to be checked

Returns

boolean

Whether or not the model is useless
Personal tools
Navigation