Witam,dodalby ktos tutaj spawn po zalogowaniu?
chodzi mi ze po kliknieciu zaloguj poprostu loguje nas na podane kordy
[lua]local sW, sH = guiGetScreenSize()
local sx, sy = (sW/1366), (sH/768)
local selectedLanguage = false
local dxfont0_roboto = dxCreateFont(":br_font/roboto.ttf", 35, false, "antialiased")
function isCursorOnElement(x,y,w,h)
local mx,my = getCursorPosition ()
local fullx,fully = guiGetScreenSize()
cursorx,cursory = mx*fullx,my*fully
if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
return true
else
return false
end
end
setElementPosition(getCamera(), 0, 0, 0)
attachElements(getCamera(), obj1)
end
function fadeMusic()
if isElement(music) then
local vol = getSoundVolume(music)
if vol <= 0.05 then
stopSound(music)
else
setSoundVolume(music, vol-0.05)
setTimer(fadeMusic, 100, 1)
end
end
end
function handleKeys(key, press)
if key == "mouse1" then
if press then
if selectedLanguage then
if isCursorOnElement(504*sx, 444*sy, 155*sx, 37*sy) then
triggerEvent("onPlayerTryLogin", localPlayer, guiGetText(loginEdit), guiGetText(passEdit))
elseif isCursorOnElement(701*sx, 444*sy, ...
Witam,bo mam taki problem ?e zrobi?em grafike do panelu logowania i za pomoc? dxDrawRectangle zrobi?em te guziki do panelu logowania,przenios?em te? klikni?cie w gui i nadal nie dzia?a.
KOD:
[lua]if getElementData(localPlayer, "player:uid") then return end
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local screenW, screenH = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
Chcia?em si? zapyta? gdzie tkwi b??d. Bo usun??em wyb?r spawniu i chcia?em ?eby po zalogowaniu od razu respi?o. Niestety po zalogowaniu jest czarny ekran i nic nie mo?na zrobi?
addEvent("logging:result", true) addEventHandler("logging:result", resourceRoot, function(value,info)
if not info then info="" end if value then
data.showed=false
showChat(true) showCursor(false) fadeCamera(false) setElementAlpha(localPlayer,255) stopSound(data.misc) triggerServerEvent("core:spawnPlayer", localPlayer) setElementData(localPlayer,"player:spawn",{1478.40,-1705.82,14.05})
-- Usuwamy elementy
destroyElement(data.button[1]) destroyElement(data.button[2]) removeEventHandler("onClientRender", root, renderLoginBox)
else data.info=tostring(info) setTimer(function() data.info=nil end, 3000, 1) end
end)
Witam,bo mam taki problem ?e przerabiam panel logowania i jak klikam na gui kt?re mam to sie nie loguje tylko jest na starym miejsu a zmieni?em tak jak strzeba.
Jak by kto? m?g? poprowi? mnie.
Za pomoc daje
[lua]if getElementData(localPlayer, "player:uid") then return end
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local screenW, screenH = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
Cze??, chcia?bym napisa? w?asny panel logowania pod MySQL.
Zrobi?em hud, super Teraz chcia?bym zacz?? co? pod MySQL. Chodzi mi dok?adniej jakie funkcje i bardziej wyt?umaczone jak si? ustawia tabele itd. w MySQL
Sci?g?em skrypt na rejestracje i jak nacisam stworz postac to nie ma zadnej reakcji.
Prosz? o to wyci?g z konsoli.
Je?li kto? chce pom?c moge podac haslo do ftp.
Wyci?g z konsoli:
[code][2018-03-12 15:56:22] Some files in 'lss-tempomat' use deprecated functions.
[2018-03-12 15:56:22] Use the 'upgrade' command to perform a basic upgrade of resources.
[2018-03-12 15:56:22] SyncMapElementData is now disabled
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:4: Bad argument @ 'createPed' [Expected bool at argument 6, got number '225']
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:7: Bad argument @ 'setElementDimension' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:8: Bad argument @ 'setElementInterior' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:9: Bad argument @ 'setElementFrozen' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:10: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] WARNING: [XyzzyRP]/[obiekty]/gracz-sklep_super_sam/sklep.lua:11: Bad argument @ 'setElementData' [Expected element at argument 1, got boolean]
[2018-03-12 15:56:22] INFO: obiektow: 326
[2018-03-12 15:56:22] ERROR: [XyzzyRP...
Ot?? wgra?em sobie taki Panel Logowania w kt?rym jest potrzebny Blur i nie wiem dlaczego.. gdy odpalam tego Blura kt?ry by? do??czony do Panelu Logowania to mi zacina.. kompletnie nie rozumiem. Warningi ci?gle wywala w DB 3. M?g?bym prosi? o pomoc? Stawiam oraz
Witam,bo mam taki problem ?e chcia?bym doda? grafike do panel logowania ale jako? mi nie idze.Panel logowania wtedy nie dzia?? ale grafika o nazwe "przycisk.png" nie dzia?a.
KOD:
[lua]
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
Witam tak jak w temacie mam pytanko odno?nie jak doda? grafike do panelu logowania mam grafike tylko ?e niewiem jak doda? j? do panelu logowania.
Czy by kto? mug? mi da? linijke z kodem co doda mi doda do panelu logowania te grafike? Wiem ?e musze potem tam zmieni? nazwe.
Pozdrawiam
Za pomoc daje
Witam,tak jak w temacie nie dzia?a mi grafika do panelu logowania,chodzi o to ?e sie nie wy?wietla.Jakby co to logo dzia?a ale te przycisk nie dzia?a
KOD:f
[lua] f getElementData(localPlayer, "player:sid") then return end
local root = getRootElement()
local resourceRoot = getResourceRootElement(getThisResource())
local screenWidth, screenHeight = guiGetScreenSize()
local blurStrength = 20
local myScreenSource = dxCreateScreenSource(screenWidth, screenHeight)
blurShader, blurTec = dxCreateShader("shaders/BlurShader.fx")
function renderblur()
if blur == true then
dxUpdateScreenSource(myScreenSource)
Witam,
mam pewien problem, a mianowicie nie mog? si? zalogowa? na serwer, lecz wszystkie pliki db2 i ogrpg-db s? podpi?te pod baze danych, daje error oraz kod.
[code][2018-02-17 22:44:01] ERROR: [bazadanych]/PanelLogowanie/s_logging.lua:83: attempt to concatenate field 'login2' (a nil value) [DUP x9]
[2018-02-17 22:44:01] WARNING: [bazadanych]/PanelLogowanie/s_logging.lua:82: Bad argument @ 'setPlayerName' [Expected string at argument 2, got nil] [DUP x9]
[2018-02-17 22:43:55] ERROR: [bazadanych]/PanelLogowanie/s_logging.lua:83: attempt to concatenate field 'login2' (a nil value)
[2018-02-17 22:43:55] WARNING: [bazadanych]/PanelLogowanie/s_logging.lua:82: Bad argument @ 'setPlayerName' [Expected string at argument 2, got nil][/code]
[lua]--[[
Panel Logowania by Kurianusz @2016 .
Regulamin /Licencja
Korzystanie z tego kodu tylko jeĹĽeli posiadasz tzw. copyrights. Zakaz usuwania tej notatki!
Pami?™taj ĹĽe nielegalne korzystanie z kodu podpada pod kodeks karny :> Tak samo jak usuni?™cie tej notatki!
]]
function sprawdzorganizacje(plr)
local x = exports['ogrpg-db']:dbGet("SELECT spawn from ogrpg_organization_list join ogrpg_organizations on ogrpg_organizations.code = ogrpg_organization_list.id WHERE uid=? and not(spawn=?)",getElementData(plr,"player:uid"),"0,0,0")
if x and #x > 0 then
local t = split(x[1].spawn, ",")
return t
end
return false
end
Panel logowanie w??czam konsol? administratora pod (P) i nic wlg nie ma panelu dlaczego?
addEvent("onClientSendRegisterDataToServer", true)
addEventHandler("onClientSendRegisterDataToServer", getRootElement(), dodaj)
addEvent("logging:checkAccount", true)
addEventHandler("logging:checkAccount", resourceRoot, function(login,pass)
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE login=?", login)
if result and #result > 0 then
if result[1].login == login and result[1].pass == md5(pass) then
setPlayerName(client, login)
setElementData(client, "player:uid", result[1].id)
triggerClientEvent(client, "logging:result", resourceRoot, true, nil)
else
triggerClientEvent(client, "logging:result", resourceRoot, false, "Podane dane s? nieprawid?owe.")
end
else
triggerClientEvent(client, "logging:result", resourceRoot, false, "Podany login nie istnieje w bazie.")
end
end)
addEvent("onClientSendRegisterDataToServer", true)
addEventHandler("onClientSendRegisterDataToServer", getRootElement(), dodaj)
addEvent("logging:newAccount", true)
addEventHandler("logging:newAccount", resourceRoot, function(login,pass)
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE login=?", login)
if result and #result > 0 then
triggerCli...
Siemka.
Co mam zrobi? ?eby pod??czy? baze mysql do panelu logowania.
Bo wiem ze trzeba wypelni? tam s_db.lua
Oczywiscie skrypt to ogrpg
Ale cos chyba jeszcze trzeba zrobic w mysql jakis plik trzeba dodac.
Prosze o pomoc bo nie wiem jak to zrobic a chce zrobic serwer na wtorek zeby go otworzyc.
Cze??, przychodz? z drobnym aczkolwiek z uci??liwym problemem.
Napisa?em sobie panel logowania, wszystko ?adnie dzia?a poza tym ?e mimo ?e podczas rejestracji wpisa?em 'TeeN' to mog? zalogowa? si? pod 'teen' co wywo?uje kilka problem?w.
urywki kodu kt?re wydaj? si? by? potrzebne;
local result=exports['DB']:pobierzTabeleWynikow("SELECT * FROM users WHERE username=?", login)
if result and #result > 0 then triggerClientEvent(plr,"addNoti",plr,"Login jest ju? zaj?ty, wybierz inny!") return
else local query=exports['DB']:zapytanie("INSERT INTO users (username,password,serial,money,score,bank_amout) VALUES (?,?,?,?,?,?)",loginp,sha256(haslop),getPlayerSerial(plr),0,0,0)
local query=exports['DB']:pobierzTabeleWynikow("SELECT * FROM users WHERE username=? LIMIT 1",loginp,sha256(haslop))
w c_side nic takiego nie ma, poprostu pobiera text z editbox'?w
[ Dodano: 2018-01-20, 13:04 ]
Naprawi?em sam, do zamkni?cia.
(I ZNOWU przypominam, ?e je?eli uwa?asz, ?e jako ma?o zaawansowany w LUA mam zostawi? ten GM, to opu?? ten temat, nie tra? swojego cennego czasu .)
Ostatnim razem poradzi?em sobie, ale teraz nie mam ju? pomys?u...
W panelu logowania na serwerze (na hostingu) po wpisaniu danych pokazuje si? komunikat: "Sending request to server". Wszystko pod??czone tak samo jak na localhoscie przez xampp, ale tam dzia?a bez zarzutu po??czenie z baz? danych, a tu takowy komunikat wyst?puje.
KONSOLA:
ERROR: mysql/connection.lua:206: attempt to call global 'mysql_escape_string' (a nil value)
ERROR: mysql/connection.lua:206: attempt to call global 'mysql_escape_string' (a nil value)
ERROR: account/login-panel/server.lua:215: call: failed to call 'mysql:escape_string' [string "?"]
ERROR: account/login-panel/server.lua:215: attempt to concatenate a boolean value
Z tego co wyczyta?em, jest to znany b??d, na hostingu zewn?trznym pojawia si? prawie zawsze, ale nie znalaz?em rozwi?zania. Jak mniemam chodzi o po??czenie z baz?, ale przecie? dok?adnie tak samo jest po??czona baza z serwerem na localhoscie i wszystko ?miga. Je?li kto? wie jak mog? to naprawi? to prosz? o rozpisanie. Z g?ry dzi?ki.
Mam ci??ko z logowaniem a dok?adnie ze skryptem lua odpowiadaj?cym za ??czeniem z baz? danych i potrzebuje was (Gdy? s? ?wi?ta, mog? poczeka?).
W spoilerze za??czy?em co wywala w konsoli.
WARNING: foldersql.lua:27: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean]
WARNING: foldersql.lua:25: Bad argument @ 'dbPrepareString'
sql.lua:26: Bad argument @ 'dbQuery' dalsza cz??? taka sama.
linijki 23 - 29 pliku sql.lua
function dbGet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...) local query=dbQuery(DBHandler, stringe) local result=dbPoll(query, -1)
return result
end
Posiadam mta_mysql.dll , korzystam z windowsa z powodu gdy? serwer stoi lokalnie po za globaln? sieci?.
Witam Mam problem mianowicie z panelem logowania nie reaguje on na nic wyczy?ci?em baze danych.Lecz Wyskakuje mi napis Konta nie ma w bazie danych nie mam pojecia co zrobi? prosz? o pomoc . Stawiam Piwko
Witam mam problem z panelem logowania XyzzyRp. Chodzi g??wnie o to, ?e nie dzia?a nic kiedy klikn? zarejestruj, logowanie. Nie wiem o co dok?adnie chodzi ale dam jeszcze logi z consoli:
[list][2017-12-07 00] ERROR: [XyzzyRP]/DB/sql.lua:70: attempt to call global 'mysql_query' (a nil value)
[2017-12-07 00] ERROR: [XyzzyRP]/lss-core/server_stats.lua:14: call: failed to call 'DB:zapytanie' [string "?"]
[2017-12-07 00] INFO: Zaladowano zmienionych domow: 25
[2017-12-07 00] ERROR: [XyzzyRP]/DB/sql.lua:70: attempt to call global 'mysql_query' (a nil value)
[2017-12-07 00] ERROR: [XyzzyRP]/lss-core/server_stats.lua:14: call: failed to call 'DB:zapytanie' [string "?"]
[2017-12-07 00] ERROR: [XyzzyRP]/DB/sql.lua:43: attempt to call global 'mysql_escape_string' (a nil value)
[2017-12-07 00] ERROR: [XyzzyRP]/lss-core/server_stats.lua:26: call: failed to call 'DB:esc' [string "?"]
[2017-12-07 00] ERROR: [XyzzyRP]/lss-core/server_stats.lua:27: bad argument #2 to 'format' (string expected, got boolean)
[2017-12-07 00] ERROR: [XyzzyRP]/DB/sql.lua:70: attempt to call global 'mysql_query' (a nil value)
[2017-12-07 00] ERROR: [XyzzyRP]/lss-core/server_stats.lua:14: call: failed to call 'DB:zapytanie' [string "?"]
[2017-12-07 00] INFO: Zaladowano zmienionych domow: 25
[2017-12-07 00] ERROR: [XyzzyRP]/DB/sql.lua:70: attempt to call global 'mysql_query' (a nil value)
[2017-12-07 00] ERROR: [XyzzyRP]/lss-core/server_stats.lua:14: call: failed to...
Witam, mam problema.. A i nu jaho piso? system logowania skompilowo? a tu b?und.. A mata se sprawdzajta:
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(26) : warning 202: number of arguments does not match definition
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(81) : error 010: invalid function or declaration
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(83) : error 010: invalid function or declaration
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(88) : error 010: invalid function or declaration
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(90) : error 010: invalid function or declaration
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(94) : error 021: symbol already defined: "Rejestruj"
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(94) : error 010: invalid function or declaration
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(94 -- 96) : error 010: invalid function or declaration
C:UsersJay_DayDesktopTU NIC NIE MA XDServergamemodesmap.pwn(94 -- 96) : fatal error 107: too many error messages on one line
Witam. Zainstalowa?em skrypt na panel logowania na moim serwerze, wszystko ?adnie w??cza si?, mog? zarejestrowa? konto, zalogowa? si? a gdy wybieram spawn to mam pokazany czarny ekran. Co sie dzieje? Jak to naprawi??
Siemka, a wi?c chcia?bym napisa? panel logowania MySQL, ale nie wiem jak si? do tego zabra?, grafik? ju? zrobi?em w guieditorze... dopiero sie ucze LUA, ale mysql znam nawet nawet Pomo?e kto? ?
GG:60968224
Witam chcia? bym zmie? kolor buttonu Zaloguj w Panelu Logowania. Gdy pr?buje zmieni? RGB to albo na panelu nie ma napis?w albo panelu nie wida?. Prosz? o pomoc.
Oto kod LUA:
No cze?? dawno tu nie zagl?da?em a dzi? przychodz? z pewnym problemem. Mam panel logowania, na pocz?tku chcia?bym wy?wietli? logo a p??niej pojawi? panel logowania. Problem jest nast?puj?cy, logo dzia?a dobrze lecz panel logowania pojawia si? nagle jakby nie wykonywa? si? w og?le ten interpolate kt?rego tam da?em. Oto kod:
local firstdx = function()
if getTickCount() < lastTick + 15000 and settings.logo then
dxDrawImage(0,0,sx,sy, textlo, 0,0,0,tocolor(255,255,255,200), false); a = interpolateBetween(0,0,0,255,0,0, getProgress(5000), "SineCurve"); dxDrawImage(0,0,sx,sy, texlogo, 0,0,0,tocolor(255,255,255,a), false);
else settings.logo = false; settings.logowanie = true; end if settings.logowanie then
a = interpolateBetween(0,0,0,255,0,0, getProgress(7000), "Linear"); dxDrawImage(screenW*480, screenH*170, sx/2, sy/2, texlogowanie, 0,0,0, tocolor(255,255,255,a), false);
if isMouseIn(655, 665, 150, 45) then --dxDrawImage(screenW*655, screenH*375, screenW*330/3, screenH*104/2, texbuttonnajechany);
print("najechal"); end elseif settings.spawny then --TODO
end
end
Nie zwracajcie uwagi na te zmienne. Brak b??d?w w debugu
Zainstalowalem sobie Xyzzy RP, wszystko super fajnie pieknie, tylko jeden b??d, Nie moge sie zalogowa?, klikam Zarejestruj, "Zarejestrowano pomyslnie!" Tylko gdy klikam "Logowanie" Nie dziala, nie moge stworzyc postaci, prosze o fast odpowiedz, Daje piwo i respekt
//edit
Fast help, chcialbym pogra? a zosta?o ma?o czasu