Search the Community
Showing results for tags 'dxdrawrectangle'.
Found 4 results
I want to render a rectangle to the cursor, but the rectangle too far from the cursor.. How to fix this in my code? code: local sx_, sy_ = 1920, 1080 local sx__, sy__ = guiGetScreenSize() local xm, ym = sx__/sx_, sy__/sy_ function render() local screenx, screeny = getCursorPosition() dxDrawRectangle((sx_-687) * xm * screenx, (sy_/2+70) * ym * screeny, 170 * xm, 25 * ym,tocolor(255,181,64,80)) end addEventHandler("onClientRender",root,render) the problem:
Hi! I'm making a hud script, and in my script when you leave the car, the rectangle shall hide, (removeEventHandler on onClientVehicleExit) but it only makes itself invisible, and when i re -enter the car, it becomes darker, an so on. It has a 150 alpha, and it looks very ugly when it is stronger than that. Any help?
Hi! I want to learn using dxDraws properly, but i don't know where can i check screen coordinates, and i want to draw a straight line, and place a box in the center, and i'm trying my best and it is like this: Coding: local x,y = guiGetScreenSize() function drawStuff() local bg = dxDrawRectangle ( 500, 250, 500, 500, tocolor ( 0, 0, 0, 155 ) ) local line1 = dxDrawLine ( 600, 500, 300, 250, tocolor(0,0,0,255)) end addEventHandler("onClientRender", root, drawStuff) addCommandHandler ("asdasd", drawStuff) Can you help me? Please?