Also 'dxDrawRectangle' returns a boolean only. Almost all DX codes do that.
addEventHandler ( "onClientGUIClick", root, function()
local gCursor_pX, gCursor_pY = getCursorPosition()
480, 590, 122, 52
if (gCursor_pX > 480) and (gCursor_pY > 590) and (gCursor_pX < 480+122) and (gCursor_pY < 590+52) then
outputChatBox("Test !!")
end
end)
This would work in your case. (If I didn't do anything wrong) Atleast you can understand what I'm trying to do out of this. I'm checking or the cursor is between the 'dxDrawRectangle' (Login Button) code as soon as you clicked.
If you are going to do it on this way, I prefer a variable for the positions, because if you ever want to change the positions, you don't have to change all positions in the script, only the variable you would have to change by then.