-
Posts
749 -
Joined
-
Last visited
-
Days Won
1
Everything posted by FlyingSpoon
-
Yes, and thank you so much, I was kind of confused on something, you see the detect clicks part, how would I know which text is being pressed? Would I do something like outputChatBox(pos[1]) I don't get that part, how do I only get a certain text that is clicked.
-
local t = { {"First", x, y, w, h}, {"Second", x, y, w, h}, {"Third", x, y, w, h}, {"Fourth", x, y, w, h} } addEventHandler("onClientRender", root, function() for i, v in pairs(t) do dxDrawText(v[1], v[2]+20, v[3], v[4], v[5]) end end) function detectClicks() for k, pos in pairs(t) do if isMouseInPosition(pos[2], pos[3], pos[4], pos[5]) -- end end end addEventHandler("onClientClick", root, detectClicks) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end
-
I get the cursor position part but how would I detect which text the mouse is on.
-
I was thinking about something lately, say if I was to create a table - local t = { "First", "Second", "Third", "Fourth" } function drawText() for i, v in ipairs(t) do dxDrawText(v, x, y+150, w, h) end end addEventHandler("onClientRender", root, drawText) That's a basic code, say if I was to click on the first Text which says "First", how would I make it so that it outputs this text, and gets the right one from the table instead of doing it all manually.
-
dxCreateGridlist, coming soon?
-
Just the one right now, but I tried to join the server with my Laptop and it works fine, and I had a few others join it too. I only get this problem on my PC, and I don't know why.
-
Then I get this - Multi Theft Auto - The exception Multiple floating point faults. (0xc00002b4) occured in the application at location 0x62f9dabc. Press OK to terminate the application. Then sometimes I get this - Multi Theft Auto - The instruction at 0x5ca1b6b3 referenced memory at 0x00000000. The memory could not be written. Click on OK to terminate the program. And most of the time I get this - Assertion failed! Program: C:/Program Files/MTA San Andreas 1.5/mta/game_sa.dll File: C:/TeamCity/buildAgent/work/1496be72.../densehashtable.h Line: 782 Expression: table For information on how your program can cause assertion failure, see the Visual C++ documentation on asserts (Press Retry to debug the applcation - JIT must be enabled) And then this, when I finally get in-game - Any help?
-
I tried to reinstall MTA, no luck, and it works with Default SA Map, but the Map works on my Laptop, but not on my PC, I have a NVIDIA GeForce GT 610... I don't understand what's wrong, it should be fine.
-
Can someone help me out.. wtf, it's a serious problem.
-
Useless post, can someone help?
-
When I try to take a screenshot - Screenshot failed (CreateOffscreenPlainSurface failed (0x8007000e)) Screenshot failed (CreateOffscreenPlainSurface failed (0x8007000e)) Also I tried to update my graphics card, and no luck, didn't fix it, also sometimes I get these weird ped settings, and my ped just goes really weird, and I'm running a custom mapping any help please?
-
local parts = { {"Tuning", ":guieditor/images/examples/mtalogo.png"}, {"Engine", ":guieditor/images/examples/mtalogo.png"}, {"Wheels", ":guieditor/images/examples/mtalogo.png"}, {"Paint", ":guieditor/images/examples/mtalogo.png"}, } local t = 2 local t2 = 1 local t3 = 3 addEventHandler("onClientRender", root, function() local v = parts[t] local v2 = parts[t2] local v3 = parts[t3] dxDrawRectangle(339, 132, 181, 124, tocolor(0, 0, 0, 146), false) dxDrawText(v2[1], 339, 142, 520, 165, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawImage(398, 175, 58, 62, v2[2], 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(735, 132, 181, 124, tocolor(0, 0, 0, 146), false) dxDrawText(v3[1], 735, 142, 916, 165, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawImage(796, 175, 58, 62, v3[2], 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(527, 130, 202, 127, tocolor(0, 0, 0, 146), false) dxDrawText(v[1], 554, 137, 700, 159, tocolor(255, 255, 255, 255), 1.00, "default", "center", "top", false, false, false, false, false) dxDrawImage(583, 164, 84, 73, v[2], 0, 0, 0, tocolor(255, 255, 255, 255), false) end ) bindKey ("arrow_r", "down", function() t = t ~= #parts and t + 1 or t t2 = t2 ~= #parts and t2 + 1 or t2 t3 = t3 ~= #parts and t3 + 1 or t3 end) bindKey ("arrow_l", "down", function() t = t ~= 1 and t - 1 or t t2 = t2 ~= 1 and t2 - 1 or t2 t3 = t3 ~= 1 and t3 - 1 or t3 end) Any better way of doing this? So it looks like it's moving from left to right, it does what I want it to do, but maybe there's a better way to do it?
-
local parts = { {"Engine", ":guieditor/images/examples/mtalogo.png"}, {"Tuning", ":guieditor/images/examples/mtalogo.png"}, {"Paint", ":guieditor/images/examples/mtalogo.png"}, } local t = 0 addEventHandler("onClientRender", root, function() for i=1, #parts do local v = parts[i] dxDrawRectangle(527, 130, 202, 127, tocolor(0, 0, 0, 146), false) dxDrawText(v[1], 554, 137, 700, 159, tocolor(255, 255, 255, 255), 1.00, "default", "center", "top", false, false, false, false, false) dxDrawImage(583, 164, 84, 73, v[2], 0, 0, 0, tocolor(255, 255, 255, 255), false) outputChatBox(t) end end ) bindKey ("arrow_r", "down", function() t = t + 1 end) bindKey ("arrow_l", "down", function() t = t - 1 end) How can I scroll through the stuff using Arrows? Left and Right.
-
I tried it, didn't work EDIT: Never mind works again
-
local unlockable = { {"Well done noob.", 1}, {"You are awesome.", 2} } function gogo() for i, v in pairs(unlockable) do outputChatBox("Unlocked: "..v[1][1], player) end end addCommandHandler("output", gogo) I want it to only output "Well done noob", but it says a nil value.
-
I have rectangles, which are called from a table, in my code above. Right now I have more than 7 rectangles, but only 7 fit in my screen size, so what I want to do is, make a new line (row) for the ongoing set of rectangles, until it fills the screen up. I don't want it to go out of the screen size, but instead start a new line/row.
-
function show() visible = true for k, v in ipairs(table) do dxDrawRectangle((k-1)*187, 10, 184, 73, tocolor(0, 0, 0, 148), false) dxDrawRectangle((k-1)*187, 6, 184, 18, tocolor(0, 0, 0, 255), false) dxDrawText("#"..tostring(k).." - Value", (k-1)*370, 6, 189, 24, tocolor(255, 255, 255, 255), 0.80, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Congratulations, on unlocking -\n("..k..") "..v[1]..".", (k-1)*189, 28, 179, 78, tocolor(255, 255, 255, 255), 0.80, "default-bold", "left", "top", false, false, false, false, false) end end So I am making a script, and when the rectangles reach 7, text goes a bit weird and it goes out of the screen, how do I make it after it reaches end of screen, it starts the next row, any ideas how I can fix this? Thanks.
-
Would it be a problem, if the Forum was running on a Windows based server?
-
It's the getTickCount(), how would I reset it or something, so I can make my animations in the DX work
-
Why can't I make it work my way? showCursor(true) local screenW, screenH = guiGetScreenSize() local start = getTickCount() local positions = { {0, (screenH - 268) / 2, animation = "Linear", duration = 800}, -- Main Menu 1 {-200, 240, animation = "Linear", duration = 800}, -- Dev Label 2 {50, 284, animation = "Linear", duration = 800}, -- Username Label 3 {135, 356, animation = "Linear", duration = 800}, -- Password Label 4 {78, 306, animation = "Linear", duration = 800}, -- Username Editbox 5 {160, 378, animation = "Linear", duration = 800}, -- Password Editbox 6 {86, 312, animation = "Linear", duration = 800}, -- Username Text 7 {170, 384, animation = "Linear", duration = 800}, -- Password Text 8 {8, 423, animation = "Linear", duration = 800}, -- Remember Details Label 9 {215, 423, animation = "Linear", duration = 800}, -- Remember Details Checkbox 10 {240, 470, animation = "Linear", duration = 800}, -- Automated Login Label 11 {35, 448, animation = "Linear", duration = 800}, -- Automated Login Checkbox 12 {220, 436, animation = "Linear", duration = 800}, -- Login Text 13 {10, 435, animation = "Linear", duration = 800}, -- Login Button 14 {225, 478, animation = "Linear", duration = 800} -- Register an account label 15 } function draw() for i,pos in pairs(positions) do positions[i].moving = animate(pos[1], pos[2], pos.animation, pos.duration, function () end) end dxDrawRectangle((screenW - 386) / 2, positions[1].moving, 386, 268, tocolor(13, 23, 26, 178), false) dxDrawText("Welcome to the server!", 447, positions[2].moving, 833, 253, tocolor(255, 255, 255, 255), 0.90, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Username :", 468, positions[3].moving, 531, 302, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("Password :", 468, positions[4].moving, 527, 372, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawRectangle(468, positions[5].moving, 345, 28, tocolor(93, 93, 93, 174), false) -- Username Editbox dxDrawRectangle(467, positions[6].moving, 345, 28, tocolor(93, 93, 93, 174), false) -- Password Editbox dxDrawText("Username", 474, positions[7].moving, 807, 325, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("*************", 474, positions[8].moving, 807, 397, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Automated Login", 492, positions[11].moving, 600, 438, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "center", false, false, false, false, false) dxDrawRectangle(467, positions[12].moving, 15, 15, tocolor(94, 94, 94, 225), false) dxDrawText("Remember Details", 492, positions[9].moving, 600, 438, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "center", false, false, false, false, false) dxDrawRectangle(467, positions[10].moving, 15, 15, tocolor(94, 94, 94, 225), false) dxDrawRectangle(715, positions[13].moving, 97, 28, tocolor(94, 94, 94, 225), false) dxDrawText("LOGIN", 714, positions[14].moving, 812, 464, tocolor(255, 255, 255, 255), 1.20, "arial", "center", "center", false, false, false, false, false) dxDrawText("Don't have an account? Register at - www.vigour-gaming.com", 446, positions[15].moving, 833, 494, tocolor(255, 255, 255, 255), 0.80, "arial", "center", "top", false, false, false, false, false) if isMouseInPosition(440, 295, 390, 37) then local movingX = animate(0, 345, "Linear", 300, function() end) dxDrawRectangle(468, 334, movingX, 1, tocolor(208, 166, 38, 174), false) -- Username Editbox Active end if isMouseInPosition(467, 378, 345, 28) then local movingX = animate(0, 345, "Linear", 300, function() end) dxDrawRectangle(467, 406, movingX, 1, tocolor(208, 166, 38, 174), false) -- Password Editbox Active end if isMouseInPosition(467, 423, 15, 15) then local movingX = animate(0, 15, "OutQuad", 300, function() end) dxDrawRectangle(467, 423, movingX, movingX, tocolor(208, 166, 38, 174), false) -- Checkbox 1 is active? end if isMouseInPosition(467, 448, 15, 15) then local movingX = animate(0, 15, "OutQuad", 300, function() end) dxDrawRectangle(467, 448, movingX, movingX, tocolor(208, 166, 38, 174), false) -- Checkbox 2 is active? end if isMouseInPosition(714, 436, 97, 28) then local movingX = animate(0, 97, "OutQuad", 300, function() end) local movingY = animate(0, 28, "OutQuad", 300, function() end) dxDrawRectangle(714, 436, movingX, movingY, tocolor(208, 166, 38, 174), false) -- login button is active? end end addEventHandler( "onClientRender", getRootElement(), draw) function animate(from, to, easing, duration, endfunction) local now = getTickCount() local change = interpolateBetween(from, 0, 0, to, 0, 0, (now - start) / duration, easing) if endfunction and now >= start+duration then endfunction() end return change end function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end Okay I've got it to work kind of, but now the problem is isMouseInPosition, when I move my mouse into the coordinates, it doesn't animate the rectangle, just regularly shows it, what could be the problem here?
-
Is that a new animate function you added in? The one I used was this - https://wiki.multitheftauto.com/wiki/Animate local anims, builtins = {}, {"Linear", "InQuad", "OutQuad", "InOutQuad", "OutInQuad", "InElastic", "OutElastic", "InOutElastic", "OutInElastic", "InBack", "OutBack", "InOutBack", "OutInBack", "InBounce", "OutBounce", "InOutBounce", "OutInBounce", "SineCurve", "CosineCurve"} function table.find(t, v) for k, a in ipairs(t) do if a == v then return k end end return false end function animate(f, t, easing, duration, onChange, onEnd) assert(type(f) == "number", "Bad argument @ 'animate' [expected number at argument 1, got "..type(f).."]") assert(type(t) == "number", "Bad argument @ 'animate' [expected number at argument 2, got "..type(t).."]") assert(type(easing) == "string" or (type(easing) == "number" and (easing >= 1 or easing <= #builtins)), "Bad argument @ 'animate' [Invalid easing at argument 3]") assert(type(duration) == "number", "Bad argument @ 'animate' [expected function at argument 4, got "..type(duration).."]") assert(type(onChange) == "function", "Bad argument @ 'animate' [expected function at argument 5, got "..type(onChange).."]") table.insert(anims, {from = f, to = t, easing = table.find(builtins, easing) and easing or builtins[easing], duration = duration, start = getTickCount( ), onChange = onChange, onEnd = onEnd}) return #anims end function destroyAnimation(a) if anims[a] then table.remove(anims, a) end end addEventHandler("onClientRender", root, function( ) local now = getTickCount( ) for k,v in ipairs(anims) do v.onChange(interpolateBetween(v.from, 0, 0, v.to, 0, 0, (now - v.start) / v.duration, v.easing)) if now >= v.start+v.duration then if type(v.onEnd) == "function" then v.onEnd( ) end table.remove(anims, k) end end end) -- ======================================================================================================= -- -- ======================================================================================================= -- showCursor(true) local screenW, screenH = guiGetScreenSize() local positions = { {0, (screenH - 268) / 2, animation = "Linear", duration = 800}, -- Main Menu 1 {-200, 240, animation = "Linear", duration = 800}, -- Dev Label 2 {50, 284, animation = "Linear", duration = 800}, -- Username Label 3 {135, 356, animation = "Linear", duration = 800}, -- Password Label 4 {78, 306, animation = "Linear", duration = 800}, -- Username Editbox 5 {160, 378, animation = "Linear", duration = 800}, -- Password Editbox 6 {86, 312, animation = "Linear", duration = 800}, -- Username Text 7 {170, 384, animation = "Linear", duration = 800}, -- Password Text 8 {8, 423, animation = "Linear", duration = 800}, -- Remember Details Label 9 {215, 423, animation = "Linear", duration = 800}, -- Remember Details Checkbox 10 {240, 448, animation = "Linear", duration = 800}, -- Automated Login Label 11 {35, 448, animation = "Linear", duration = 800}, -- Automated Login Checkbox 12 {220, 436, animation = "Linear", duration = 800}, -- Login Text 13 {10, 435, animation = "Linear", duration = 800}, -- Login Button 14 {225, 478, animation = "Linear", duration = 800} -- Register an account label 15 } function draw() for i,pos in pairs(positions) do positions[i].moving = animate(pos[1], pos[2], pos.animation, pos.duration, function () end) outputChatBox(positions[2].moving) end dxDrawRectangle((screenW - 386) / 2, positions[1].moving, 386, 268, tocolor(13, 23, 26, 178), false) dxDrawText("Welcome to the server!", 447, positions[2].moving, 833, 253, tocolor(255, 255, 255, 255), 0.90, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Username :", 468, positions[3].moving, 531, 302, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("Password :", 468, positions[4].moving, 527, 372, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawRectangle(468, positions[5].moving, 345, 28, tocolor(93, 93, 93, 174), false) -- Username Editbox dxDrawRectangle(467, positions[6].moving, 345, 28, tocolor(93, 93, 93, 174), false) -- Password Editbox dxDrawText("Username", 474, positions[7].moving, 807, 325, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("*************", 474, positions[8].moving, 807, 397, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Automated Login", 492, positions[9].moving, 600, 438, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "center", false, false, false, false, false) dxDrawRectangle(467, positions[10].moving, 15, 15, tocolor(94, 94, 94, 225), false) dxDrawText("Remember Details", 492, positions[11].moving, 600, 438, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "center", false, false, false, false, false) dxDrawRectangle(467, positions[12].moving, 15, 15, tocolor(94, 94, 94, 225), false) dxDrawRectangle(715, positions[13].moving, 97, 28, tocolor(94, 94, 94, 225), false) dxDrawText("LOGIN", 714, positions[14].moving, 812, 464, tocolor(255, 255, 255, 255), 1.20, "arial", "center", "center", false, false, false, false, false) dxDrawText("Don't have an account? Register at - www.vigour-gaming.com", 446, positions[15].moving, 833, 494, tocolor(255, 255, 255, 255), 0.80, "arial", "center", "top", false, false, false, false, false) if isMouseInPosition(440, 295, 390, 37) then local movingX = animate(0, 345, "Linear", 300, function() end) dxDrawRectangle(468, 334, movingX, 1, tocolor(208, 166, 38, 174), false) -- Username Editbox Active end if isMouseInPosition(467, 378, 345, 28) then local movingX = animate(0, 345, "Linear", 300, function() end) dxDrawRectangle(467, 406, movingX, 1, tocolor(208, 166, 38, 174), false) -- Password Editbox Active end if isMouseInPosition(467, 423, 15, 15) then local movingX = animate(0, 15, "OutQuad", 300, function() end) dxDrawRectangle(467, 423, movingX, movingX, tocolor(208, 166, 38, 174), false) -- Checkbox 1 is active? end if isMouseInPosition(467, 448, 15, 15) then local movingX = animate(0, 15, "OutQuad", 300, function() end) dxDrawRectangle(467, 448, movingX, movingX, tocolor(208, 166, 38, 174), false) -- Checkbox 2 is active? end if isMouseInPosition(714, 436, 97, 28) then local movingX = animate(0, 97, "OutQuad", 300, function() end) local movingY = animate(0, 28, "OutQuad", 300, function() end) dxDrawRectangle(714, 436, movingX, movingY, tocolor(208, 166, 38, 174), false) -- login button is active? end end addEventHandler( "onClientRender", getRootElement(), draw) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end I mean it does animate it, but it's not appearing as it should, it's jumbled up and appearing incorrectly, not like it should. Is there something wrong with the code?
-
-- ======================================================================================================= -- -- ======================================================================================================= -- showCursor(true) local screenW, screenH = guiGetScreenSize() local positions = { {0, (screenH - 268) / 2}, -- Main Menu {-200, 240}, -- Dev Label {50, 284}, -- Username Label {135, 356}, -- Password Label {78, 306}, -- Username Editbox {160, 378}, -- Password Editbox {86, 312}, -- Username Text {170, 384}, -- Password Text {8, 423}, -- Remember Details Label {215, 423}, -- Remember Details Checkbox {240, 448}, -- Automated Login Label {35, 448}, -- Automated Login Checkbox {220, 436}, -- Login Text {10, 435}, -- Login Button {225, 478} -- Register an account label } local y = 0 function start() for i = 1, #positions do local pos = positions[i] animate(pos[1], pos[2], "Linear", 800, function(positions) y = positions[i] end) end end addEventHandler("onClientResourceStart", getRootElement(), start) addEventHandler("onClientRender", root, function() dxDrawRectangle((screenW - 386) / 2, y[1], 386, 268, tocolor(13, 23, 26, 178), false) dxDrawText("Welcome to the server!", 447, y[2], 833, 253, tocolor(255, 255, 255, 255), 0.90, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Username :", 468, y[3], 531, 302, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("Password :", 468, y[4], 527, 372, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawRectangle(468, y[5], 345, 28, tocolor(93, 93, 93, 174), false) -- Username Editbox dxDrawRectangle(467, y[6], 345, 28, tocolor(93, 93, 93, 174), false) -- Password Editbox if isMouseInPosition(440, 295, 390, 37) then animate(0, 345, "Linear", 300, function(moveX) local moveX = moveX dxDrawRectangle(468, 334, moveX, 1, tocolor(208, 166, 38, 174), false) -- Username Editbox Active end) end if isMouseInPosition(467, 378, 345, 28) then animate(0, 345, "Linear", 300, function(moveX) local moveX = moveX dxDrawRectangle(467, 406, moveX, 1, tocolor(208, 166, 38, 174), false) -- Password Editbox Active end) end dxDrawText("Username", 474, y[7], 807, 325, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("*************", 474, y[8], 807, 397, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) if isMouseInPosition(467, 448, 15, 15) then animate(0, 15, "OutQuad", 300, function(moveX) local moveX = moveX dxDrawRectangle(467, 448, moveX, moveX, tocolor(208, 166, 38, 174), false) -- Checkbox 2 is active? end) end dxDrawRectangle(467, y[9], 15, 15, tocolor(94, 94, 94, 225), false) dxDrawText("Automated Login", 492, y[10], 600, 463, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "center", false, false, false, false, false) if isMouseInPosition(467, 423, 15, 15) then animate(0, 15, "OutQuad", 300, function(moveX) local moveX = moveX dxDrawRectangle(467, 423, moveX, moveX, tocolor(208, 166, 38, 174), false) -- Checkbox 2 is active? end) end dxDrawRectangle(467, y[11], 15, 15, tocolor(94, 94, 94, 225), false) dxDrawText("Remember Details", 492, y[12], 600, 438, tocolor(255, 255, 255, 255), 1.00, "arial", "left", "center", false, false, false, false, false) dxDrawRectangle(715, y[13], 97, 28, tocolor(94, 94, 94, 225), false) dxDrawText("LOGIN", 714, y[14], 812, 464, tocolor(255, 255, 255, 255), 1.20, "arial", "center", "center", false, false, false, false, false) dxDrawText("Don't have an account? Register at - www.vigour-gaming.com", 446, y[15], 833, 494, tocolor(255, 255, 255, 255), 0.80, "arial", "center", "top", false, false, false, false, false) end ) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end I'm trying to make the animate function work through a table or something, so instead of using it separately every single time, maybe I can run it through a table, and it will make my code cleaner too. How can I do that? Can someone help, I'd really appreciate it thank you.
-
Why can't I put it in in the render?