mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into funkyfranky
This commit is contained in:
@@ -181,8 +181,21 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
Client:Message( "You are speeding on the taxiway! Slow down or you will be removed from this airbase! Your current velocity is " .. string.format( "%2.0f km/h", Velocity ), 5, "Warning " .. SpeedingWarnings .. " / 3" )
|
||||
Client:SetState( self, "Warnings", SpeedingWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Player " .. Client:GetPlayerName() .. " has been removed from the airbase, due to a speeding violation ...", 10, "Airbase Police" ):ToAll()
|
||||
Client:Destroy()
|
||||
MESSAGE:New( "Player " .. Client:GetPlayerName() .. " is being damaged at the airbase, due to a speeding violation ...", 10, "Airbase Police" ):ToAll()
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
local function DestroyUntilHeavilyDamaged( Client )
|
||||
local ClientCoord = Client:GetCoordinate()
|
||||
ClientCoord:Explosion( 100 )
|
||||
local Damage = Client:GetLife()
|
||||
local InitialLife = Client:GetLife0()
|
||||
MESSAGE:New( "Player " .. Client:GetPlayerName() .. " Damage ... " .. Damage, 5, "Airbase Police" ):ToAll()
|
||||
if ( Damage / InitialLife ) * 100 < 80 then
|
||||
Client:ScheduleStop( DestroyUntilHeavilyDamaged )
|
||||
end
|
||||
end
|
||||
Client:ScheduleOnce( 1, DestroyUntilHeavilyDamaged, Client )
|
||||
--Client:ScheduleRepeat( 1, 1, 0, nil, DestroyUntilHeavilyDamaged, Client )
|
||||
--Client:Destroy()
|
||||
trigger.action.setUserFlag( "AIRCRAFT_"..Client:GetID(), 100)
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
|
||||
@@ -442,7 +442,7 @@ function MISSILETRAINER._MenuMessages( MenuParameters )
|
||||
|
||||
if MenuParameters.Distance ~= nil then
|
||||
self.Distance = MenuParameters.Distance
|
||||
MESSAGE:New( "Hit detection distance set to " .. self.Distance * 1000 .. " meters", 15, "Menu" ):ToAll()
|
||||
MESSAGE:New( "Hit detection distance set to " .. ( self.Distance * 1000 ) .. " meters", 15, "Menu" ):ToAll()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user