Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ENT:SetELS(on)
- if on == self:GetELS() then return end
- if self.v.IsScar then
- if self.v.SirenIsOn == nil then return end
- if not self.v.SirenSound then return end
- if on then self:SetHorn(false) end
- self.v.SirenIsOn = on
- self.v:SetNWBool("SirenIsOn", on)
- if on then
- self.v.SirenSound:Play()
- else
- self.v.SirenSound:Stop()
- end
- elseif self.v.IsSimfphyscar then
- local dt = on and 0 or .5
- self.v.emson = not on
- self.v.KeyPressedTime = CurTime() - dt
- numpad.Deactivate(self, KEY_H, false)
- elseif vcmod_main and vcmod_els
- and isfunction(self.v.VC_setELSLights)
- and isfunction(self.v.VC_setELSSound) then
- self.v:VC_setELSLights(on)
- self.v:VC_setELSSound(on)
- elseif Photon
- and isfunction(self.v.ELS_SirenOn)
- and isfunction(self.v.ELS_SirenOff)
- and isfunction(self.v.ELS_LightsOff) then
- if on then
- self.v:ELS_SirenOn()
- else
- self.v:ELS_SirenOff()
- self.v:ELS_LightsOff()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement