Player.SprayDecal
From GMod Wiki
Function | |
Syntax | Player:SprayDecal( Vector world_orgin, Vector local_direction ) |
Description: | |
Causes a player to spray their decal from the absolute position of the first vector in a local direction specified by the second vector. | |
Returns: | nil |
In Object: | Player |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.SprayDecal]Player.SprayDecal [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Spray's a player's decal below them. |
---|---|
Used on | |
Code | function SprayDown( pl ) pl:SprayDecal(pl:GetPos(),-pl:GetUp()) end |
Output | The player's decal will now appear beneath their feet. |
Additional Notes
- The vector arguments are interesting because the first one is a world vector (absolute position in the world) while the second one is a local position (relative to the absolute position).
- This could be used to limit where a player can spray by forcing the direction, or to allow a player to spray anywhere on the map without a distance limit.