IMaterial.GetName

From GMod Wiki

Jump to: navigation, search
Function
Syntax Material:GetName( )
Description:
Returns the name of the material
Returns: String materialname
In Object: Material
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=IMaterial.GetName]IMaterial.GetName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionChecks if the material exists then prints the results to the console.
Used onNewerClient.png
Code
 
if Material( "models/props/cs_assault/dollar" ):GetName() == "___error" then
  Msg( "Material doesn't exist!\n" )
else
  Msg( "Material exists!\n" )
end
 
OutputDisplays the results in the console.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox