Code:
function Util_CreateLocString(text)
local tmpstr = LOC(text)
tmpstr[1] = text
return tmpstr
end
Rule_AddInterval(ammoindicator,1)
function ammoindicator()
UI_SetDisplayIngameScore(true, false)
local SGroupID = Util_AddMouseoverSquadToSGroup()
if SGroupID == nil then
UI_SetScoreSingle(Util_CreateLocString("N/A"), Util_CreateLocString("N/A"))
else
local itemcount = SGroup_GetNumSlotItem( SGroupID, BP_GetSlotItemBlueprint("slot_item/generic_ammunition.lua") )
local itemowner = SGroup_GetName(SGroupID)
UI_SetScoreSingle(Util_CreateLocString(Loc_ConvertNumber(itemowner)), Util_CreateLocString(Loc_ConvertNumber(itemcount)))
end
end
Scar_AddInit(ammoindicator)
Now,I have get it showed on screen
but I haven't knew how to update the SGroupID which the mouse input.
I add a "Rule_AddInterval(ammoindicator,1)" , but it freeze in start without error message.
Any ideas ?