Great Scott! 1955!

This commit is contained in:
Dan
2020-02-28 22:38:10 +00:00
parent 9cdf7a753a
commit e8d6ab1689
3 changed files with 18 additions and 3 deletions

View File

@@ -988,10 +988,22 @@ function RADAR:SetAntennaSpeedLock( ant, speed, dir, lockType )
self:SetAntennaSpeedIsLocked( ant, true )
-- Send a message to the NUI side to play the beep sound with the current volume setting
SendNUIMessage( { _type = "audio", name = "beep", vol = RADAR:GetSettingValue( "beep" ) } )
SendNUIMessage( { _type = "audio", name = "beep", vol = self:GetSettingValue( "beep" ) } )
-- Send a message to the NUI side to play the lock audio with the current voice volume setting
SendNUIMessage( { _type = "lockAudio", ant = ant, dir = dir, vol = RADAR:GetSettingValue( "voice" ) } )
SendNUIMessage( { _type = "lockAudio", ant = ant, dir = dir, vol = self:GetSettingValue( "voice" ) } )
-- Great Scott!
if ( speed == "¦88" and self:GetSettingValue( "speedType" ) == "mph" ) then
math.randomseed( GetGameTimer() )
local chance = math.random()
-- 15% chance
if ( chance <= 0.15 ) then
SendNUIMessage( { _type = "audio", name = "speed_alert", vol = self:GetSettingValue( "beep" ) } )
end
end
end
end