Jump to content

HELP!


Bilal135

Recommended Posts

function dx_1() 
        dxDrawRectangle(459, 0, 428, 37, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Don't forget to check out the site zombie-stampede.enjin.com", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
function dx_2() 
        dxDrawRectangle(459, 0, 398, 53, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Lets keep the server running help support the server with a", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
        dxDrawText("small donation. You will be rewarded.", 472, 28, 847, 47, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
    function dx_3() 
        dxDrawRectangle(508, 0, 257, 33, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 518, 4, 556, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Remember to read the rules at F1.", 568, 4, 927, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
function dx1() 
addEventHandler("onClientRender", root, dx_1) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_1) 
end, 1000, 0) 
end 
dx1() 
  
function dx2() 
setTimer(function() 
addEventHandler("onClientRender", root, dx_2) 
end, 2000, 0) 
removeEventHandler("onClientRender", root, dx_2) 
end 
dx2() 
  
function dx3() 
setTimer(function() 
addEventHandler("onClientRender", root, dx_3) 
end, 3000, 0) 
removeEventHandler("onClientRender", root, dx_3) 
end 
dx3() 

Error: lua 30 and lua 38 : addEventHandler ['onClientRender' with this function is already handled]

Link to comment

Try this

function dx_1() 
        dxDrawRectangle(459, 0, 428, 37, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Don't forget to check out the site zombie-stampede.enjin.com", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
function dx_2() 
        dxDrawRectangle(459, 0, 398, 53, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Lets keep the server running help support the server with a", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
        dxDrawText("small donation. You will be rewarded.", 472, 28, 847, 47, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
    function dx_3() 
        dxDrawRectangle(508, 0, 257, 33, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 518, 4, 556, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Remember to read the rules at F1.", 568, 4, 927, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
function dx1() 
addEventHandler("onClientRender", root, dx_1) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_1) 
    end, 1000, 0) 
end 
  
  
function dx2() 
addEventHandler("onClientRender", root, dx_2) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_2) 
   end, 2000, 0) 
end 
  
  
function dx3() 
addEventHandler("onClientRender", root, dx_3) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_3) 
   end, 3000, 0) 
end 

Link to comment
function dx_1() 
        dxDrawRectangle(459, 0, 428, 37, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Don't forget to check out the site zombie-stampede.enjin.com", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
function dx_2() 
        dxDrawRectangle(459, 0, 398, 53, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 470, 4, 508, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Lets keep the server running help support the server with a", 518, 4, 877, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
        dxDrawText("small donation. You will be rewarded.", 472, 28, 847, 47, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
    function dx_3() 
        dxDrawRectangle(508, 0, 257, 33, tocolor(0, 0, 0, 181), false) 
        dxDrawText("*INFO*", 518, 4, 556, 23, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) 
        dxDrawText("Remember to read the rules at F1.", 568, 4, 927, 23, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) 
    end 
  
function dx1() 
addEventHandler("onClientRender", root, dx_1) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_1) 
    end, 1000, 1) 
end 
dx1() 
  
function dx2() 
addEventHandler("onClientRender", root, dx_2) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_2) 
   end, 2000, 1) 
end 
dx2() 
  
function dx3() 
addEventHandler("onClientRender", root, dx_3) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_3) 
   end, 3000, 1) 
end 
dx3() 

Link to comment

dx_1 and dx_2 appears together (this is weird), and the third one appears alone (as it should be). Also if I set it to 1, it only appears once and never appears again.

I want, for example, dx_1 to appear first, then it disappears and dx_2 appears, then it disappears and dx_3 appears. This process should continue.

Link to comment
function dx1() 
addEventHandler("onClientRender", root, dx_1) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_1) 
    end, 1000, 1) 
end 
dx1() 
  
function dx2() 
addEventHandler("onClientRender", root, dx_2) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_2) 
   end, 1000, 1) 
end 
setTimer(dx2,1000,1) 
  
function dx3() 
addEventHandler("onClientRender", root, dx_3) 
setTimer(function() 
removeEventHandler("onClientRender", root, dx_3) 
   end, 1000, 1) 
end 
setTimer(dx3,2000,1) 

Edited by Guest
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...