Hello, I’m releasing a Scaleform wrapper that is much easier to read and understand. Here is an example of a brief scaleform script using this wrapper.

Citizen.CreateThread(function()
scaleform = GetScaleform("binoculars")
i = 0
while true do
Wait(0)
i = i + 1
RenderFullscreen(scaleform)
if i == 2000 then -- turns off after 20ish seconds
UnloadScaleform(scaleform)
end
end
end)

Here’s another snippet of a helicopter hud with changing params.

Citizen.CreateThread(function()
scaleform = GetScaleform("heli_cam")
i = 0
while true do
Wait(0)
i = i + 1
RenderFullscreen(scaleform)
if i > 500 then -- Just random example of changing the thingy.
x = math.random(10,100)
CallFunction(scaleform, "SET_ALT_FOV_HEADING", 152.0 + x, 0.7, 90.0 + x)
end
if i == 3500 then -- turns off after 30ish seconds
UnloadScaleform(scaleform)
end
end
end)

The example script will create the binoculars effect for roughly 20 seconds (depending on framerate) and then it will turn the effect off by unloading the scaleform. The second example creates a helicopter hud and applies random values to it.

If anyone had this downloaded I suggest you redownload this latest version. It is now working properly. I wasn’t doing float checking properly and it should be working fine now. There’s an updated example that shows me messing with the helicopter_hud.