Jump to content

[Help] top Chat


Snow-Man

Recommended Posts

hey, i have made top chat but i have got problem in text position

http://postimg.org/image/4nne1czu9

  
addEventHandler("onClientRender",getRootElement(),  
    function() 
        for i, message in ipairs ( dxMessage ) do 
        dxDrawRectangle(256, 2*((i-1)*20), 898, 33, tocolor(0, 0, 0, 100)) 
        dxDrawText(message[1], 256, 2*((i-1)*20), 898, 33, tocolor(message[3], message[4],message[5], 255), 1.00, "bankgothic", "left", "center", false, false, true, true, false) 
         end 
    end 
) 

but when i use guiGetScreenSize() i got error expected number, got NaN

my codes :

  
local sizeX, sizeY = guiGetScreenSize(  ) 
local sx, sy = sizeX/1280, sizeY/1024 
  
addEventHandler("onClientRender",getRootElement(),  
    function() 
        for i, message in ipairs ( dxMessage ) do 
            sx, sy, sh, sw = sx*256, sy*2, sx*898, sy*33 
            dxDrawRectangle(sx, sy*((i-1)*20), sh, sw, tocolor(0, 0, 0, 100)) 
            dxDrawText(message[1], sx, sy*((i-1)*20), sh, sw, tocolor(message[3], message[4],message[5], 255), 1.00, "bankgothic", "left", "center", false, false, true, true, false) 
             
         
        end 
    end 
) 
  

Link to comment

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...