Garry's Mod Wiki

Player:SprayDecal

  Player:SprayDecal( Vector sprayOrigin, Vector sprayEndPos )

Description

Makes a player spray their decal.

Arguments

1 Vector sprayOrigin
The location to spray from
2 Vector sprayEndPos
The location to spray to

Example

Makes the player spray their decal 5000 units away.

local ply = Entity( 1 ) local eyepos = ply:EyePos() ply:SprayDecal( eyepos, eyepos + ply:GetAimVector() * 5000 )