Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MuzzleFlash(args)
- if LocalPlayer:GetEquippedWeapon().id == 14 then
- ray = Physics:Raycast(LocalPlayer:GetPosition(), Camera:GetAngle() * Vector3.Forward, 0, 2)
- ClientParticleSystem.Play( AssetLocation.Game, {
- -- Required:
- position = Vector3(ray.position.x, (ray.position.y + 1), ray.position.z),
- angle = LocalPlayer:GetAngle(),
- path = "fx_bulhit_flash_strong_huge_01.psmb",
- -- Optional:
- timeout = 5.0
- } )
- ClientLight.Play {
- -- Required:
- position = Vector3(ray.position.x, (ray.position.y + 1), ray.position.z),
- angle = LocalPlayer:GetAngle(),
- color = Color(255, 125, 0),
- -- Optional:
- timeout = 0.1,
- constant_attenuation = 1.0,
- linear_attenuation = 0.1,
- quadratic_attenuation = 0.01,
- multiplier = 50.0,
- radius = 100.0,
- fade_in_duration = 0,
- fade_out_duration = 0
- }
- end
- end
- Events:Subscribe("MouseDown", MuzzleFlash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement