-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmath_client.lua
More file actions
30 lines (25 loc) · 828 Bytes
/
math_client.lua
File metadata and controls
30 lines (25 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- Created by (c)The_GTA.
local server_texture = false;
addEvent("onServerTransmitImage", true);
addEventHandler("onServerTransmitImage", root, function(imgPixels)
if ( server_texture ) then
destroyElement(server_texture);
end
server_texture = dxCreateTexture(imgPixels, "argb", false, "wrap");
end
);
addEventHandler( "onClientRender", root, function()
-- draw a server transmitted image.
if ( server_texture ) then
local width, height = dxGetMaterialSize( server_texture );
dxDrawImage( 0, 0, width, height, server_texture );
end
end
);
addCommandHandler("bbcl", function()
if (server_texture) then
destroyElement(server_texture);
server_texture = false;
end
end
);