Sziasztok! A debug se, se a Console nem ír semmit. Ha nem adok meg valami adatot akkor teszi amit kell, de ha jót adok meg akkor csak amit kliens oldalon kell azt teszi meg.
client:
u = {}
GUIEditor = {
edit = {}
}
addEventHandler(\"onClientResourceStart\", resourceRoot,
function()
ui = guiCreateEdit(0.46, 0.41, 0.17, 0.02, \"\", true)
showCursor(true)
pi = guiCreateEdit(0.42, 0.53, 0.21, 0.02, \"\", true)
end
)
local screenW, screenH = guiGetScreenSize()
addEventHandler(\"onClientRender\", root,
function()
uig = guiGetText(ui)
pig = guiGetText(pi)
dxDrawRectangle(screenW * 0.3823, screenH * 0.2713, screenW * 0.2417, screenH * 0.4944, tocolor(1, 0, 0, 230), false)
dxDrawText(\"TopMTA - LoginPanel\", screenW * 0.3812, screenH * 0.2713, screenW * 0.6240, screenH * 0.3074, tocolor(255, 255, 255, 255), 1.00, \"bankgothic\", \"center\", \"center\", false, false, false, false, false)
dxDrawText(\"FelhasználóNév:\", screenW * 0.3823, screenH * 0.4037, screenW * 0.4557, screenH * 0.4352, tocolor(255, 255, 255, 255), 0.50, \"bankgothic\", \"left\", \"center\", false, false, false, false, false)
dxDrawText(\"Jelszó:\", screenW * 0.3823, screenH * 0.5287, screenW * 0.4557, screenH * 0.5602, tocolor(255, 255, 255, 255), 0.50, \"bankgothic\", \"left\", \"center\", false, false, false, false, false)
dxDrawRectangle(screenW * 0.3859, screenH * 0.7019, screenW * 0.1052, screenH * 0.0491, tocolor(8, 8, 8, 230), false)
dxDrawRectangle(screenW * 0.5156, screenH * 0.7019, screenW * 0.1052, screenH * 0.0491, tocolor(8, 8, 8, 230), false)
dxDrawText(\"Bejelentkezés\", 739, 759, 943, 811, tocolor(255, 255, 255, 255), 0.50, \"bankgothic\", \"center\", \"center\", false, false, false, false, false)
dxDrawText(\"Regisztráció\", 988, 758, 1192, 810, tocolor(255, 255, 255, 255), 0.50, \"bankgothic\", \"center\", \"center\", false, false, false, false, false)
end
)
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
function elore (gomb, statusz, absX, absY)
if statusz == \"down\" and gomb == \"left\" then
if dobozbaVan(screenW * 0.3859, screenH * 0.7019, screenW * 0.1052, screenH * 0.0491, absX, absY) then
outputChatBox(\"bejelentkezes\")
who = localPlayer
triggerServerEvent ( \"check\", resourceRoot, uig,pig,who )
elseif dobozbaVan(screenW * 0.5156, screenH * 0.7019, screenW * 0.1052, screenH * 0.0491, absX, absY) then
outputChatBox(\"regisztracio\")
end
end
end
addEventHandler(\"onClientClick\",getRootElement(),elore)
server:
function checklogin(u,p,w)
local ui = u
local pi = p
local who = w
if ui == \"\" or pi == \"\" then
outputChatBox(\"Nem írtál be valamilyen adatot!\",who)
elseif getAccount(ui,pi) == true then
logIn(who,ui,pi)
outputChatBox(\"Sikeres bejelentkezés!\",who)
end
end
addEvent(\"check\",true)
addEventHandler(\"check\",getRootElement(),checklogin)