@Demonen
-- local scaleform_handle = ...
-- local vehicle = ...
local camRot = GetGameplayCamRot()
local pos = GetEntityCoords(vehicle)
local min, max = GetModelDimensions(GetEntityModel(vehicle), {}, {})
-- Draw scaleform above vehicle and facing the player
DrawScaleformMovie_3dNonAdditive(
scaleform_handle, --scaleform
pos.x, pos.y, 2.25 + pos.z + max.z, --position
0, 0, -camRot.z, -- rotation
2.0, -- unk
1.0, --sharpness
1.0, -- unk,
10.0, 4.5, 0, -- draw scale
0 -- unk
)
Also just dumping this here for whoever finds it useful, coords for michaels living room projectorâŚ
-- Breaking news scaleform on projector
local s_news = LoadScaleForm('breaking_news')
PushScaleformMovieFunction(s_news, "SHOW_STATIC")
PushScaleformMovieFunctionParameterInt(1)
PopScaleformMovieFunctionVoid()
DrawScaleformMovie_3dNonAdditive(
s_news, --scaleform
-800.158, 173.603, 74.38,
0.0, 0.0, 69.13,
1.0, 1.0, 1.0,
3.163, 1.783, 1.0,
2
)
For those interested in making their own scaleforms; You can grab COH2 tools through steam
2 Likes
Demonen
January 27, 2018, 9:56pm
65
Absolutely great, thanks.
Is this stuff per frame, or what?
@Demonen DrawScaleformMovie_3dNonAdditive should be called every frame, yes.
Anyone know the scaleform for the âTakedownâ bar in lspdfr?
Vespura
February 2, 2018, 10:07am
68
NativeUI uses this (not a scaleform):
Sprite.Draw("timerbars", "all_black_bg", (int)res.Width - safe.X - 298, (int)res.Height - safe.Y - (40 + (4 * interval)), 300, 37, 0f, Color.FromArgb(180, 255, 255, 255));
Which uses sprites found in
GTA V/update/update.rpf/x64/textures/script_txds.rpf/timerbars.ytd/
Source
1 Like
Is it possible to draw multiples of the same scaleform at the same time? RequestScaleForm seems to return the same handle every time.
Iâm not sure itâs possible. Youâll notice scaleforms such as mp_car_stats which have multiple copies. Iâd tried before to just set the scaleform options multiple times per frame but that only works with a wait(0) which causes flickering.
As a work around; You can copy the gfx file and stream it.
1 Like
so ill just be âstupidâ here well cause i am , but :
with the breaking news scaleform , how the eff do i actually get the top ticker to work with different kinds of messages? you know , so it actually âticksâ between them xD
also didnt the middle one scroll aswell or do i just remember that wrong ? xD
Here is a good example of the Vehicle Attributes you referenced: https://github.com/qiangqiang101/PremiumDeluxeMotorsport.NET
Cheers.