mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
Great Scott! 1955!
This commit is contained in:
16
cl_radar.lua
16
cl_radar.lua
@@ -988,10 +988,22 @@ function RADAR:SetAntennaSpeedLock( ant, speed, dir, lockType )
|
|||||||
self:SetAntennaSpeedIsLocked( ant, true )
|
self:SetAntennaSpeedIsLocked( ant, true )
|
||||||
|
|
||||||
-- Send a message to the NUI side to play the beep sound with the current volume setting
|
-- 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
|
-- 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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,10 @@ const audioNames =
|
|||||||
away: "away.ogg",
|
away: "away.ogg",
|
||||||
|
|
||||||
// Plate reader
|
// Plate reader
|
||||||
plate_hit: "plate_hit.ogg"
|
plate_hit: "plate_hit.ogg",
|
||||||
|
|
||||||
|
// Hmm
|
||||||
|
speed_alert: "speed_alert.ogg"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defines which audio needs to play for which direction
|
// Defines which audio needs to play for which direction
|
||||||
|
|||||||
BIN
nui/sounds/speed_alert.ogg
Normal file
BIN
nui/sounds/speed_alert.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user