Jump to content

Modzel

Members
  • Posts

    2
  • Joined

  • Last visited

Modzel's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. server_script addEventHandler("onResourceStart",resourceRoot, connect) addEvent("logowanie",true) addEventHandler("logowanie",root,function(login,haslo) local wynik= dbQuery(db,"SELECT * FROM user WHERE login=?",login) local wynikglowny= dbPoll(wynik,-1) if #wynikglowny==0 then return triggerClientEvent("pokaz:blad",source,"[BŁĄD] Takie konto nie istnieje!") end if wynikglowny[1].haslo~=haslo then triggerClientEvent("pokaz:blad",source,"[BŁĄD] Podane hasło jest nieprawidłowe!") end end) addEvent("rejestracja",true) addEventHandler("rejestracja",root,function(rlogin,rhaslo) local wynik= dbQuery(db,"SELECT * FROM user WHERE login=?",rlogin) local wynikglowny= dbPoll(wynik,-1) if #wynikglowny>0 then return triggerClientEvent("pokaz:blad2",source,"[BŁĄD] Takie konto już istnieje!") end end) client_script addEventHandler("onClientResourceStart",root, function() showPlayerHudComponent("all",false) end) showCursor(true) showChat(false) blad=false 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 ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end function isCursorOverText(posX, posY, sizeX, sizeY) if ( not isCursorShowing( ) ) then return false end local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) return ( (cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) ) end logowanie_login = guiCreateEdit(0.41, 0.33, 0.17, 0.05, "", true) logowanie_haslo = guiCreateEdit(0.41, 0.47, 0.17, 0.05, "", true) guiEditSetMasked(logowanie_haslo, true) local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() if blad then dxDrawText(blad, (screenW * 0.3156) + 1, (screenH * 0.9139) + 1, (screenW * 0.6914) + 1, (screenH * 0.9792) + 1, tocolor(0, 0, 0, 255), 2.00, "default", "center", "center", false, false, false, false, false) dxDrawText(blad, screenW * 0.3156, screenH * 0.9139, screenW * 0.6914, screenH * 0.9792, tocolor(255, 0, 0, 255), 2.00, "default", "center", "center", false, false, false, false, false) end if not open then return end if isMouseInPosition(557, 416, 155, 29) then r,g,b=255,0,0 else r,g,b=255,255,255 end if isMouseInPosition(517, 504, 232, 29) then rr,gg,bb=255,0,0 else rr,gg,bb=255,255,255 end dxDrawRectangle(335, 122, 251, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.3000, screenH * 0.0000, screenW * 0.4063, screenH * 1.0000, tocolor(132, 131, 122, 138), false) dxDrawText("Panel logowania", screenW * 0.4313, screenH * 0.0139, screenW * 0.5992, screenH * 0.0625, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) dxDrawText("CRITICALRPG", screenW * 0.3117, screenH * 0.0667, screenW * 0.6984, screenH * 0.2125, tocolor(255, 255, 255, 255), 4.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(screenW * 0.3008, screenH * 0.2472, screenW * 0.7047, screenH * 0.2472, tocolor(255, 255, 255, 255), 3, false) dxDrawText("Login:", screenW * 0.4703, screenH * 0.2792, screenW * 0.5984, screenH * 0.3347, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) dxDrawText("Hasło:", 602, 288, 766, 328, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) dxDrawText("ZALOGUJ", screenW * 0.4367, screenH * 0.5653, screenW * 0.5281, screenH * 0.6375, tocolor(r, g, b, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawText("ZAREJESTRUJ", screenW * 0.4055, screenH * 0.6875, screenW * 0.4969, screenH * 0.7597, tocolor(rr, gg, bb, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawLine(screenW * 0.3016, screenH * 0.8944, screenW * 0.7055, screenH * 0.8944, tocolor(255, 255, 255, 255), 3, false) end ) function interakcja(element,state) if localPlayer==element then open=state guiSetVisible(logowanie_login,state) guiSetVisible(logowanie_haslo,state) showCursor=state end end function interakcjarejestracja() open2=true guiSetVisible(logowanie_login,false) guiSetVisible(logowanie_haslo,false) showCursor(true) end interakcja(localPlayer,true) addEventHandler("onClientKey",root,function(button,state) if not state then return end if button=="mouse1" then if isMouseInPosition(557, 416, 155, 29) then login=guiGetText(logowanie_login) haslo=guiGetText(logowanie_haslo) if string.len(login)==0 then blad="[BŁĄD] Wpisz Login!" return end if string.len(haslo)==0 then blad="[BŁĄD] Wpisz Hasło!" return end triggerServerEvent("logowanie",localPlayer,login,haslo) end end end) addEventHandler("onClientKey",root,function(button,state) if not state then return end if isMouseInPosition(517, 504, 232, 29) then if button=="mouse1" then open2=true blad2=false rejestracja_okno = guiCreateWindow(0.61, 0.21, 0.38, 0.64, "Rejestracja Konta", true) guiWindowSetMovable(rejestracja_okno, false) guiWindowSetSizable(rejestracja_okno, false) regulamin = guiCreateEdit(0.03, 0.04, 0.92, 0.79, "", true, rejestracja_okno) guiEditSetReadOnly(regulamin, true) skrol = guiCreateScrollBar(459, 21, 15, 360, false, false, rejestracja_okno) rejestracja_login = guiCreateEdit(0.21, 0.84, 0.30, 0.05, "", true, rejestracja_okno) rejestracja_haslo = guiCreateEdit(0.67, 0.84, 0.30, 0.05, "", true, rejestracja_okno) guiEditSetMasked(rejestracja_haslo, true) local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root,function() if blad2 then dxDrawText(blad2, screenW * 0.6180, screenH * 0.7931, screenW * 0.7008, screenH * 0.8347, tocolor(255, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) end if not open2 then return end if isMouseInPosition(914, 569, 230, 31) then r,g,b=255,0,0 else r,g,b=255,255,255 end if isMouseInPosition(1232, 153, 23, 12) then rr,gg,bb=255,0,0 else rr,gg,bb=255,78,8 end dxDrawText("Login:", screenW * 0.6273, screenH * 0.7417, screenW * 0.7023, screenH * 0.7750, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, true, false, false) dxDrawText("Hasło:", screenW * 0.8023, screenH * 0.7417, screenW * 0.8773, screenH * 0.7750, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, true, false, false) dxDrawText("ZAREJESTRUJ", screenW * 0.7109, screenH * 0.7806, screenW * 0.8977, screenH * 0.8417, tocolor(r, g, b, 255), 3.00, "default", "center", "center", false, false, true, false, false) dxDrawImage(screenW * 0.9641, screenH * 0.2139, screenW * 0.0172, screenH * 0.0139, "cross.png", 0, 0, 0, tocolor(rr, gg, bb, 255), true) end) end end end) addEventHandler("onClientKey",root,function(button,state) if not state then return end if isMouseInPosition(914, 569, 230, 31) then if button=="mouse1" then rlogin=guiGetText(rejestracja_login) rhaslo=guiGetText(rejestracja_haslo) if string.len(rlogin)==0 then blad2="[BŁĄD] Wpisz Login!" return end if string.len(rhaslo)==0 then blad2="[BŁĄD] Wpisz Hasło!" return end triggerServerEvent("rejestracja",localPlayer,rlogin,rhaslo) end end end) addEvent("pokaz:blad",true) addEventHandler("pokaz:blad",root,function(txt) if source== localPlayer then blad=txt end end) addEventHandler("pokaz:blad2",root,function(txt2) if source== localPlayer then blad2=txt2 end end) error: Client triggered server side event rejestracja , but event is not added serverside Prosiłbym o pomoc
  2. server_script addEventHandler("onResourceStart",resourceRoot, connect) addEvent("logowanie",true) addEventHandler("logowanie",root,function(login,haslo) local wynik= dbQuery(db,"SELECT * FROM user WHERE login=?",login) local wynikglowny= dbPoll(wynik,-1) if #wynikglowny==0 then return triggerClientEvent("pokaz:blad",source,"[BŁĄD] Takie konto nie istnieje!") end if wynikglowny[1].haslo~=haslo then triggerClientEvent("pokaz:blad",source,"[BŁĄD] Podane hasło jest nieprawidłowe!") end end) addEvent("rejestracja",true) addEventHandler("rejestracja",root,function(rlogin,rhaslo) local wynik= dbQuery(db,"SELECT * FROM user WHERE login=?",rlogin) local wynikglowny= dbPoll(wynik,-1) if #wynikglowny>0 then return triggerClientEvent("pokaz:blad2",source,"[BŁĄD] Takie konto już istnieje!") end end) client_script addEventHandler("onClientResourceStart",root, function() showPlayerHudComponent("all",false) end) showCursor(true) showChat(false) blad=false 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 ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end function isCursorOverText(posX, posY, sizeX, sizeY) if ( not isCursorShowing( ) ) then return false end local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) return ( (cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) ) end logowanie_login = guiCreateEdit(0.41, 0.33, 0.17, 0.05, "", true) logowanie_haslo = guiCreateEdit(0.41, 0.47, 0.17, 0.05, "", true) guiEditSetMasked(logowanie_haslo, true) local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function() if blad then dxDrawText(blad, (screenW * 0.3156) + 1, (screenH * 0.9139) + 1, (screenW * 0.6914) + 1, (screenH * 0.9792) + 1, tocolor(0, 0, 0, 255), 2.00, "default", "center", "center", false, false, false, false, false) dxDrawText(blad, screenW * 0.3156, screenH * 0.9139, screenW * 0.6914, screenH * 0.9792, tocolor(255, 0, 0, 255), 2.00, "default", "center", "center", false, false, false, false, false) end if not open then return end if isMouseInPosition(557, 416, 155, 29) then r,g,b=255,0,0 else r,g,b=255,255,255 end if isMouseInPosition(517, 504, 232, 29) then rr,gg,bb=255,0,0 else rr,gg,bb=255,255,255 end dxDrawRectangle(335, 122, 251, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.3000, screenH * 0.0000, screenW * 0.4063, screenH * 1.0000, tocolor(132, 131, 122, 138), false) dxDrawText("Panel logowania", screenW * 0.4313, screenH * 0.0139, screenW * 0.5992, screenH * 0.0625, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) dxDrawText("CRITICALRPG", screenW * 0.3117, screenH * 0.0667, screenW * 0.6984, screenH * 0.2125, tocolor(255, 255, 255, 255), 4.00, "pricedown", "left", "top", false, false, false, false, false) dxDrawLine(screenW * 0.3008, screenH * 0.2472, screenW * 0.7047, screenH * 0.2472, tocolor(255, 255, 255, 255), 3, false) dxDrawText("Login:", screenW * 0.4703, screenH * 0.2792, screenW * 0.5984, screenH * 0.3347, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) dxDrawText("Hasło:", 602, 288, 766, 328, tocolor(255, 255, 255, 255), 2.00, "default", "left", "top", false, false, false, false, false) dxDrawText("ZALOGUJ", screenW * 0.4367, screenH * 0.5653, screenW * 0.5281, screenH * 0.6375, tocolor(r, g, b, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawText("ZAREJESTRUJ", screenW * 0.4055, screenH * 0.6875, screenW * 0.4969, screenH * 0.7597, tocolor(rr, gg, bb, 255), 3.00, "default", "left", "top", false, false, true, false, false) dxDrawLine(screenW * 0.3016, screenH * 0.8944, screenW * 0.7055, screenH * 0.8944, tocolor(255, 255, 255, 255), 3, false) end ) function interakcja(element,state) if localPlayer==element then open=state guiSetVisible(logowanie_login,state) guiSetVisible(logowanie_haslo,state) showCursor=state end end function interakcjarejestracja() open2=true guiSetVisible(logowanie_login,false) guiSetVisible(logowanie_haslo,false) showCursor(true) end interakcja(localPlayer,true) addEventHandler("onClientKey",root,function(button,state) if not state then return end if button=="mouse1" then if isMouseInPosition(557, 416, 155, 29) then login=guiGetText(logowanie_login) haslo=guiGetText(logowanie_haslo) if string.len(login)==0 then blad="[BŁĄD] Wpisz Login!" return end if string.len(haslo)==0 then blad="[BŁĄD] Wpisz Hasło!" return end triggerServerEvent("logowanie",localPlayer,login,haslo) end end end) addEventHandler("onClientKey",root,function(button,state) if not state then return end if isMouseInPosition(517, 504, 232, 29) then if button=="mouse1" then open2=true blad2=false rejestracja_okno = guiCreateWindow(0.61, 0.21, 0.38, 0.64, "Rejestracja Konta", true) guiWindowSetMovable(rejestracja_okno, false) guiWindowSetSizable(rejestracja_okno, false) regulamin = guiCreateEdit(0.03, 0.04, 0.92, 0.79, "", true, rejestracja_okno) guiEditSetReadOnly(regulamin, true) skrol = guiCreateScrollBar(459, 21, 15, 360, false, false, rejestracja_okno) rejestracja_login = guiCreateEdit(0.21, 0.84, 0.30, 0.05, "", true, rejestracja_okno) rejestracja_haslo = guiCreateEdit(0.67, 0.84, 0.30, 0.05, "", true, rejestracja_okno) guiEditSetMasked(rejestracja_haslo, true) local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root,function() if blad2 then dxDrawText(blad2, screenW * 0.6180, screenH * 0.7931, screenW * 0.7008, screenH * 0.8347, tocolor(255, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) end if not open2 then return end if isMouseInPosition(914, 569, 230, 31) then r,g,b=255,0,0 else r,g,b=255,255,255 end if isMouseInPosition(1232, 153, 23, 12) then rr,gg,bb=255,0,0 else rr,gg,bb=255,78,8 end dxDrawText("Login:", screenW * 0.6273, screenH * 0.7417, screenW * 0.7023, screenH * 0.7750, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, true, false, false) dxDrawText("Hasło:", screenW * 0.8023, screenH * 0.7417, screenW * 0.8773, screenH * 0.7750, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, true, false, false) dxDrawText("ZAREJESTRUJ", screenW * 0.7109, screenH * 0.7806, screenW * 0.8977, screenH * 0.8417, tocolor(r, g, b, 255), 3.00, "default", "center", "center", false, false, true, false, false) dxDrawImage(screenW * 0.9641, screenH * 0.2139, screenW * 0.0172, screenH * 0.0139, "cross.png", 0, 0, 0, tocolor(rr, gg, bb, 255), true) end) end end end) addEventHandler("onClientKey",root,function(button,state) if not state then return end if isMouseInPosition(914, 569, 230, 31) then if button=="mouse1" then rlogin=guiGetText(rejestracja_login) rhaslo=guiGetText(rejestracja_haslo) if string.len(rlogin)==0 then blad2="[BŁĄD] Wpisz Login!" return end if string.len(rhaslo)==0 then blad2="[BŁĄD] Wpisz Hasło!" return end triggerServerEvent("rejestracja",localPlayer,rlogin,rhaslo) end end end) addEvent("pokaz:blad",true) addEventHandler("pokaz:blad",root,function(txt) if source== localPlayer then blad=txt end end) addEventHandler("pokaz:blad2",root,function(txt2) if source== localPlayer then blad2=txt2 end end) error: Client triggered server side event rejestracja , but event is not added serverside
×
×
  • Create New...