_DRAW_BINK_MOVIE
DocsDrawBinkMovie(binkMovie, posX, posY, scaleX, scaleY, rotation, r, g, b, a)Description
Must be called each frame, will play at specified position on screen when called with <code>_PLAY_BINK_MOVIE</code>
Parameters
| Name | Type | Description |
|---|---|---|
binkMovie | int | The movie to be drawn (from [`_SET_BINK_MOVIE`](#\_0x338D9F609FD632DB)). |
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). |
Quick Snippet: Get CoordinatesposXposY
posXposYAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Returns
voidThis native does not return a value.
Examples
Official
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)