Garry's Mod Wiki

util.IsValidModel

boolean util.IsValidModel( string modelName )

Description

Checks if the specified model is valid.

A model is considered invalid in following cases:

  • Starts with a space or maps
  • Doesn't start with models
  • Contains any of the following:
    • _gestures
    • _animations
    • _postures
    • _gst
    • _pst
    • _shd
    • _ss
    • _anm
    • .bsp
    • cs_fix
  • On server: If the model isn't precached, if the model file doesn't exist on the disk
  • If precache failed
  • Model is the error model

Arguments

1 string modelName
Name/Path of the model to check.

Returns

1 boolean
Whether the model is valid or not. Returns false clientside if the model is not precached by the server.

Page Links


Special Pages


Wikis

?

Render Time: 24ms

DB GetPage 5
Generate Html 3
SaveChanges (1) 8
Render Body 0
Render Sidebar 6