Jump to content

I cant do this?


Sex*

Recommended Posts

So I wanted to to this to my g_dxGUI but it fails, floods over my debugscript error but says that the error is from nametags.lua but thats working...so its gotta be that:

g_dxGUI = { 
            mapdisplay = dxText:create('Map: ', 2, screenHeight - dxGetFontHeight(0.4, 'bankgothic'), false, 'bankgothic', 0.6, 'left'), 
            mapdisplayName = dxText:create('-', 55, screenHeight - dxGetFontHeight(0.4, 'bankgothic'), false, 'bankgothic',0.6, 'left'), 
            -- 
            nextdisplay = dxText:create('Next Map: ', 2, screenHeight - dxGetFontHeight(0.4, 'bankgothic'), false, 'bankgothic', 0.6, 'left'), 
            nextdisplayName = dxText:create('-', 100, screenHeight - dxGetFontHeight(0.4, 'bankgothic'), false, 'bankgothic', 0.6, 'left'), 
            -- 
            fps = dxText:create("FPS: ", screenWidth - 182,screenHeight - 66, false, 'bankgothic', 0.7), 
            fpsNumber = dxText:create("-", screenWidth - 130,screenHeight - 66, false, 'bankgothic', 0.7) 
            -- 
            } 
        g_dxGUI.fps:color(255, 255, 255, 255) 
        g_dxGUI.fpsNumber:color(108,123,139,255) 
        -- 
        g_dxGUI.fps:type("shadow", 1, 0, 0, 0, 255) 
        g_dxGUI.fpsNumber:type("shadow", 1, 0, 0, 0, 255) 
        -- 
        g_dxGUI.mapdisplay:color(200,30,0,255) 
        g_dxGUI.mapdisplayName:color(255,255,255,255) 
        g_dxGUI.mapdisplay:type('shadow', 1, 0, 0, 0, 255) 
        g_dxGUI.mapdisplayName:type('shadow', 1, 0, 0, 0, 255) 
        g_dxGUI.nextdisplay:color(0,170,70,255) 
        g_dxGUI.nextdisplayName:color(255, 255, 255, 255) 
        g_dxGUI.nextdisplay:type('shadow', 1, 0, 0, 0, 255) 
        g_dxGUI.nextdisplayName:type('shadow', 1, 0, 0, 0, 255) 
        g_dxGUI.nextdisplay:visible(false) 
        g_dxGUI.nextdisplayName:visible(false) 
        g_GUI = { 
            timeleftbg = guiCreateStaticImage(screenWidth-(screenWidth/5.5), 0, screenWidth/3.9, screenHeight/18, 'img/timeleft.png', false, nil), 
        timeleft = guiCreateLabel(screenWidth-(screenWidth/2.9*0.72), screenHeight/35, screenWidth/3.8, screenHeight/30, '',false,timeleftbg), 
        timepassed = guiCreateLabel(screenWidth-(screenWidth/2.95*0.55), screenHeight/35, screenWidth/3.8, screenHeight/30, '', false, timeleftbg), 
timepassedbg = guiCreateStaticImage(screenWidth-(screenWidth/7.5), 43, screenWidth/3.9, screenHeight/18, 'img/timepassed.png', false, nil), 
fpsping = local ping = getPlayerPing(getLocalPlayer()) 
local x, y = guiGetScreenSize ( ) 
  
r,g,b=0,0,0 
alpha=255 
  
  
local root = getRootElement() 
local player = getLocalPlayer() 
local counter = 0 
local starttick 
local currenttick 
addEventHandler("onClientRender",root, 
    function() 
        if not starttick then 
            starttick = getTickCount() 
        end 
        counter = counter + 1 
        currenttick = getTickCount() 
        if currenttick - starttick >= 1000 then 
            setElementData(player,"FPS",counter) 
            counter = 0 
            starttick = false 
        end 
    end 
) 
  
function drawStates () 
    addEventHandler ( "onClientRender", root, pingState ) 
    addEventHandler ( "onClientRender", root, fpsState ) 
end 
addEventHandler ( "onClientResourceStart", resourceRoot, drawStates ) 
  
  
  
function pingState() 
    posx= x-30 
    posy= 60 
  
    dxDrawRectangle ( posx, posy, 4, 4, tocolor ( r, g, b, alpha ) ) 
    dxDrawRectangle ( posx+5, posy-4, 4,8, tocolor ( r, g, b, alpha ) ) 
    dxDrawRectangle ( posx+10, posy-8, 4,12, tocolor ( r, g, b, alpha ) ) 
    dxDrawRectangle ( posx+15, posy-12, 4,16, tocolor ( r, g, b, alpha ) ) 
    dxDrawRectangle ( posx+20, posy-16, 4,20, tocolor ( r, g, b, alpha ) ) 
  
    r2,g2,b2=255,255,255 
    alpha2=255 
  
if ping <= 100 then 
  
    dxDrawRectangle ( posx, posy, 4, 4, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+5, posy-4, 4,8, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+10, posy-8, 4,12, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+15, posy-12, 4,16, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+20, posy-16, 4,20, tocolor ( r2, g2, b2, alpha2 ) ) 
  
elseif ping >=101 and ping <= 200 then 
  
    dxDrawRectangle ( posx, posy, 4, 4, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+5, posy-4, 4,8, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+10, posy-8, 4,12, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+15, posy-12, 4,16, tocolor ( r2, g2, b2, alpha2 ) ) 
  
elseif ping >=201 and ping <= 300 then 
  
    dxDrawRectangle ( posx, posy, 4, 4, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+5, posy-4, 4,8, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+10, posy-8, 4,12, tocolor ( r2, g2, b2, alpha2 ) ) 
  
elseif ping >=301 and ping <= 400 then 
  
    dxDrawRectangle ( posx, posy, 4, 4, tocolor ( r2, g2, b2, alpha2 ) ) 
    dxDrawRectangle ( posx+5, posy-4, 4,8, tocolor ( r2, g2, b2, alpha2 ) ) 
  
elseif ping >=401 and ping <= 500 then 
  
    dxDrawRectangle ( posx, posy, 4, 4, tocolor ( r2, g2, b2, alpha2 ) ) 
  
end 
  
end 
  
function fpsState() 
    posx2= x-55 
    posy2= 60 
  
    dxDrawText ( getElementData(getLocalPlayer(),"FPS"), posx2-12, posy2-6, x, y, tocolor ( 255, 255, 255, 255 ), 1.4, "default-bold" ) 
  
    dxDrawText ( "FPS", posx2-13, posy2+10, x, y, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold" ) 
    dxDrawText ( "PING", posx2+23, posy2+10, x, y, tocolor ( 255, 255, 255, 255 ), 1.0, "default-bold" ) 
end 

Link to comment
Would help if you posted what error and/or warnings you are getting.

The errors are totally wrong..the script I changed is race_client.lua but the errors started coming from nametags.lua after race_client.lua changing.

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