Hey guys,
i've been writing a little CCTV script, but for some reason dxDrawText&dxDrawRectangle are NOT working with onClientRender or anything else, even a friend called "Asus" who is very experienced in DX had no idea why this didn't work.
The problem is simple, the texts only draw at the very first seconds of the start from the script, they only work for a tiny amount of seconds(atleast 2 of the 3 texts).
dxDrawText("CAMERA "..login.CCTVcurrent, 0, 0, sX, sY, tocolor(255, 255, 255, 255), scaleY*0.3, font, "right", "bottom", false, false, true, true)
dxDrawText("DATE", 0, 0, sX, sY, tocolor(255, 255, 255, 255), scaleY*0.3, font, "left", "top", false, false, true, true)
dxDrawText("TIME", 0, 0, sX, sY, tocolor(255, 255, 255, 255), scaleY*0.3, font, "right", "top", false, false, true, true)
sX&sY are screenWidth&Heigth, scaleY is sY/1920, font is a custom DX font or clear if it failed to create it.
For some reason, the only text that draws is DATE, the other 2 texts only appear for about 1 second then instantly disappear.
I have tried putting them on a renderTarget, didn't work.
I have tried putting them in different functions, didn't work.
I have tried using onClientRender and onClientPreRender, didn't work.
I have tried putting them in a seperate resource, WORKED. But i have no idea why.
The texts only draw if they are on the top left, putting them bottom left/right or top right makes them only appear for a second.
I checked my VRAM with dxGetStatus but i have more than 3gb left for MTA, about 200 used for shaders&rendertargets and 16 used for fonts
There are no errors or warnings in debugscript 3.