Player.DrawWorldModel
From GMod Wiki
Function | |
Syntax | Player:DrawWorldModel( Boolean draw ) |
Description: | |
Show/Hide the player's weapon world model. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.DrawWorldModel]Player.DrawWorldModel [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Hides the player's weapon world model. |
---|---|
Used on | |
Code | function SWEP:Deploy() self.Owner:DrawWorldModel(false) end |
Output | Hides the player's weapon world model. |
Additional Notes
- This function must be inside a server-side lua file such as init.lua.
- A return must not be in the deploy code for this to work.
- This is different than SWEP.DrawWorldModel! This one makes you able to disable drawing the world model of the weapons that player is carrying, but the other one is a hook for SWEPS.