Jump to content

Display Armament SA341 L


gillesdrone
 Share

Recommended Posts

I send it to you in a private message, but in case someone need it too:

 

You need 3 functions.

The first one, parse the message to get the correct values. (Thanks to [FSF]Ian )

The other 2 look for the left and right screen ammo values.

 

function parse_indication(indicator_id)  -- Thanks to [FSF]Ian code
local ret = {}
local li = list_indication(indicator_id)
if li == "" then return nil end
local m = li:gmatch("-----------------------------------------\n([^\n]+)\n([^\n]*)\n")
while true do
local name, value = m()
if not name then break end
	ret[name] = value
end
return ret
end



function get_RIGHT_screen_AMMO()

local li = parse_indication(8) 
if not li then return "   " end
if not li.RIGHT_screen then return "   " end
return li.RIGHT_screen

end


function get_LEFT_screen_AMMO()

local li = parse_indication(8) 
if not li then return "   " end
if not li.LEFT_screen then return "   " end
return li.LEFT_screen

end


 

 

...

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...