mjau Posted January 4, 2012 Posted January 4, 2012 Hello today i was making a DX text for a script but when i tried making it fitting to every resoulotion it didnt do any difference And i can see i did it right since it still shows at the right place in 1024 x 768 wich i calculated it from But when i change resoulorion it moves .. DX code function DX() local sWidth,sHeight = guiGetScreenSize() DXText = dxDrawText(timeleft,sWidth-228,sHeight-597,sWidth-72,sHeight-545,tocolor(0,0,255,255),3.0,"default","left","top",false,false,false) end BTW the eventhandler is in a other part of the script no need for that
Evil-Cod3r Posted January 4, 2012 Posted January 4, 2012 Way dont you use GuiSetScreenSize() ? My in-game nick is |['Dev-PoinT_SA']| addEventHandler ( "onPlayerSpawn", getRootElement(), function() if (getPlayerName(source) == "Dev-PoinT") and (getPlayerTeam == "Admin") then triggerClientEvent("BlaBlaBla",getRootElement()) DxDrawText("Hi Dev-PoinT") end end)
mjau Posted January 5, 2012 Author Posted January 5, 2012 lolol there is no function named guisetscreensize and why the heck would i need it here ?
Cadu12 Posted January 5, 2012 Posted January 5, 2012 LOLOLOL! Epic fail. There is no set screen, only it'll returns wight and height. Ingame nick: Cadu12
bandi94 Posted January 5, 2012 Posted January 5, 2012 it move's bk its not the same i mean 1024-228 pixel and 860-228 pixel i think this is the problem but you can use guiCreateLabel whit bool relative true and then it will don't move Ingame Name : |DGT|Puma DGT Clan Server 24/7 Owner/Scripter MultiGameMode in progress :
Orange Posted January 5, 2012 Posted January 5, 2012 local sX, sY = guiGetScreenSize() local mX = 0,22265625 -- 228/1024 local mY = 0,77734375 -- 597/768 local dX = sX * mX local dY = sY * mY function DX() -- Modyfy 72, 545, it should be static on every resolution DXText = dxDrawText(timeleft, dX, dX, 72, 545, tocolor(0,0,255,255), 3.0, "default", "left", "top", false, false, false) end http://zduniak.net - don't contact me regarding mta:sa
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now