跳转到帖子

coalition.side


转到解决 由Zyll解决,

已推荐帖子

发布于

Hi eveyone,

Instead of switching to coallition with the coalition values like

if Group.getByName(flight):getCoalition() == 1 then...

I would like to test the coalition side ("RED" which is same as 1 for exemple) but can't find the right syntax..

Anybody ?

  • Like 1
发布于

Perhaps this will help --

--- MS: code.Create & Load Client Tables
aircraftClientBlueNames = {}
aircraftClientRedNames = {}

do
 local function contains(tbl, val)
  for _,v in ipairs(tbl) do
   if v == val then return true end
  end
  return false
 end
 for uName, uData in pairs(mist.DBs.humansByName) do
  if(contains({'red'}, uData.coalition)) then
   if not(contains(aircraftClientRedNames, uName)) then
    table.insert(aircraftClientRedNames, uName)
   end
  end
  if(contains({'blue'}, uData.coalition)) then
   if not(contains(aircraftClientBlueNames, uName)) then
    table.insert(aircraftClientBlueNames, uName)
   end
  end
 end
end

 

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

  • 最近浏览   0位会员

    • 没有会员查看此页面。
×
×
  • 创建新的...