mirror of
https://github.com/weyne85/DML.git
synced 2025-10-29 16:57:49 +00:00
Version 1.3.1
stopGaps owned zones factory zones flag documentation
This commit is contained in:
22
server modules/stopGapGUI.lua
Normal file
22
server modules/stopGapGUI.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
stopGapGUI = {}
|
||||
stopGapGUI.version = "1.0.0"
|
||||
stopGapGUI.fVal = -300 -- 5 minutes max block
|
||||
--
|
||||
-- Server Plug-In for StopGap mission script, only required for server
|
||||
-- Put into (main DCS save folder)/Scripts/Hooks/ and restart DCS
|
||||
--
|
||||
function stopGapGUI.onPlayerTryChangeSlot(playerID, side, slotID)
|
||||
if not slotID then return end
|
||||
if slotID == "" then return end
|
||||
if not DCS.isServer() then return end
|
||||
if not DCS.isMultiplayer() then return end
|
||||
|
||||
local gName = DCS.getUnitProperty(slotID, DCS.UNIT_GROUPNAME)
|
||||
if not gName then return end
|
||||
local sgName = "SG" .. gName
|
||||
-- tell all clients to remove this group's statics if they are deployed
|
||||
net.dostring_in("server", " trigger.action.setUserFlag(\""..sgName.."\", " .. stopGapGUI.fVal .. "); ")
|
||||
net.send_chat("+++SG: readying group <" .. sgName .. "> for slotting")
|
||||
end
|
||||
|
||||
DCS.setUserCallbacks(stopGapGUI)
|
||||
Reference in New Issue
Block a user