mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
Either strongest or fastest speed can be locked
This commit is contained in:
@@ -608,7 +608,7 @@ function RADAR:LockAntennaSpeed( ant )
|
|||||||
if ( self:IsFastDisplayEnabled() and self:DoesAntennaHaveValidFastData( ant ) ) then
|
if ( self:IsFastDisplayEnabled() and self:DoesAntennaHaveValidFastData( ant ) ) then
|
||||||
data[1] = self:GetAntennaFastSpeed( ant )
|
data[1] = self:GetAntennaFastSpeed( ant )
|
||||||
data[2] = self:GetAntennaFastDir( ant )
|
data[2] = self:GetAntennaFastDir( ant )
|
||||||
elseif ( not self:IsFastDisplayEnabled() and self:DoesAntennaHaveValidData( ant ) ) then
|
else
|
||||||
data[1] = self:GetAntennaSpeed( ant )
|
data[1] = self:GetAntennaSpeed( ant )
|
||||||
data[2] = self:GetAntennaDir( ant )
|
data[2] = self:GetAntennaDir( ant )
|
||||||
end
|
end
|
||||||
@@ -1028,12 +1028,15 @@ end )
|
|||||||
-- Update the vehicle pool every 3 seconds
|
-- Update the vehicle pool every 3 seconds
|
||||||
Citizen.CreateThread( function()
|
Citizen.CreateThread( function()
|
||||||
while ( true ) do
|
while ( true ) do
|
||||||
|
if ( DoesEntityExist( PLY.veh ) and PLY.inDriverSeat and PLY.vehClassValid and RADAR:CanPerformMainTask() and RADAR:IsEitherAntennaOn() ) then
|
||||||
local vehs = RADAR:GetAllVehicles()
|
local vehs = RADAR:GetAllVehicles()
|
||||||
|
|
||||||
RADAR:SetVehiclePool( vehs )
|
RADAR:SetVehiclePool( vehs )
|
||||||
|
|
||||||
Citizen.Wait( 3000 )
|
Citizen.Wait( 3000 )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Citizen.Wait( 0 )
|
||||||
|
end
|
||||||
end )
|
end )
|
||||||
|
|
||||||
-- Main thread
|
-- Main thread
|
||||||
|
|||||||
Reference in New Issue
Block a user