Jump to content

get Screen Size


Hero192

Recommended Posts

Posted

Hello everyone,anyone of you guys know a good way to calcul the normal Gui size to the function getScreenSize?

that will shows to all different computers the same size ,like if you did it in middle it show in middle but i need a good way please and how to calculs it to make it exactly and easier to any pos you want,thank you for your care

Posted
local x,y = guiGetScreenSize() 

-- Get players resolution

and this way u can use it with the function

dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) -- Create our black transparent MOTD background Rectangle. 

Posted

Anyone can explain how to calcul and put the guiGetScreenSize in the place of crosshair for the custom crosshair that show for all different computers in same location , please tell me how

Posted
Anyone can explain how to calcul and put the guiGetScreenSize in the place of crosshair for the custom crosshair that show for all different computers in same location , please tell me how

All what you need is

-- Functions 
dxCreateShader() 
dxCreateTexture() 
getControlState() 
dxSetShaderValue() 
engineApplyShaderToWorldTexture() 
  
-- Events 
onClientRender() 
  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...