#PLAYERTASK

* added coalition check to event handler
This commit is contained in:
Applevangelist 2022-08-25 09:44:45 +02:00
parent 94741f1b4a
commit 8289ebbe50

View File

@ -1103,7 +1103,7 @@ PLAYERTASKCONTROLLER.Messages = {
--- PLAYERTASK class version. --- PLAYERTASK class version.
-- @field #string version -- @field #string version
PLAYERTASKCONTROLLER.version="0.1.21" PLAYERTASKCONTROLLER.version="0.1.22"
--- Constructor --- Constructor
-- @param #PLAYERTASKCONTROLLER self -- @param #PLAYERTASKCONTROLLER self
@ -1341,7 +1341,7 @@ function PLAYERTASKCONTROLLER:_EventHandler(EventData)
end end
self:T(self.lid..text) self:T(self.lid..text)
end end
elseif EventData.id == EVENTS.PlayerEnterAircraft then elseif EventData.id == EVENTS.PlayerEnterAircraft and EventData.IniCoalition == self.Coalition then
if EventData.IniPlayerName and EventData.IniGroup and self.UseSRS then if EventData.IniPlayerName and EventData.IniGroup and self.UseSRS then
self:T(self.lid.."Event for player: "..EventData.IniPlayerName) self:T(self.lid.."Event for player: "..EventData.IniPlayerName)
local frequency = self.Frequency local frequency = self.Frequency