| Property | Value |
|---|---|
| Native Name | _DRAW_BINK_MOVIE |
| Hash | 0x7118E83EEB9F7238 |
| Return Type | void |
| Parameters | binkMovie (int), posX (float), posY (float), scaleX (float), scaleY (float), rotation (float), r (int), g (int), b (int), a (int) |
Description: Must be called each frame, will play at specified position on screen when called with _PLAY_BINK_MOVIE
Parameters
binkMovie(int) — The movie to be drawn (from_SET_BINK_MOVIE).posX(float) — The centered x position of the movie (0.0 - 1.0).posY(float) — The centered y position of the movie (0.0 - 1.0).scaleX(float) — The x scale of the movie (0.0 - 1.0).scaleY(float) — The y scale of the movie (0.0 - 1.0).rotation(float) — The rotation of the movie (0.0 - 360.0).r(int) — The red value of the movie (0 - 255).g(int) — The green value of the movie (0 - 255).b(int) — The blue value of the movie (0 - 255).a(int) — The alpha value of the movie (0 - 255).
Examples
Citizen.CreateThread(function()
local binkint = SetBinkMovie("casino_trailer") -- BINK movie, list can be found at https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f
SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%, just incase of errors.
while (GetBinkMovieTime(binkint) < 100.0) do
print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
PlayBinkMovie(binkint)
DrawBinkMovie(binkint, 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255) -- This example draws and plays in fullscreen in the center (no matter the resolution).
Citizen.Wait(0)
end
end)