Garry's Mod Wiki

Revision Difference

Player:SprayDecal#527037

<function name="SprayDecal" parent="Player" type="classfunc"> <description>Makes a player spray their decal.</description> <realm>Server</realm> <args> <arg name="sprayOrigin" type="Vector">The location to spray from</arg> <arg name="sprayEndPos" type="Vector">The location to spray to</arg> </args> </function> <example> <description>Makes the player spray their decal 5000 units away.</description> <code>ply:SprayDecal(ply:EyePos(),ply:EyePos() + ply:GetAimVector()*5000)</code>⤶ <code>⤶ local ply = Entity(1)⤶ ply:SprayDecal(ply:EyePos(), ply:EyePos() + ply:GetAimVector() * 5000)⤶ </code>⤶ </example>