dxUpdateScreenSource | Multi Theft Auto: Wiki Skip to content

dxUpdateScreenSource

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function updates the contents of a screen source texture with the screen output from GTA

Syntax

dxUpdateScreenSource ( )

Code Examples

client

This example will update the screen capture when F7 is pressed

addEventHandler("onClientResourceStart", resourceRoot,
function()
myScreenSource = dxCreateScreenSource( 500, 500) -- Create a screen source texture which is 500 x 500 pixels
end
)
bindKey( "F7", "down",
function()
if myScreenSource then
dxUpdateScreenSource( myScreenSource ) -- Capture the screen
end
end
)
addEventHandler( "onClientRender", root,
function()
if myScreenSource then
dxDrawImage ( 0, 0, 300, 300, myScreenSource ) -- Draw the result in top left corner
end
end
)