[11:23:52] ERROR: Client (Martin) triggered serverside event getPlayerBann, but event is not added serverside [11:23:58] ERROR: Client (Martin) triggered serverside event onRegisterClick, but event is not added serverside [/quote] Mit ért az alatt hogy nincs szerver oldalhoz adva? És hogyan tudnám megcsinálni? A válaszokat előre is köszönöm!
function onRegisterClick(player, username, password, email)local password = md5(password)local registerQuery = dbPoll(dbQuery(connection, \"SELECT * FROM accounts\"), -1)for _, row in ipairs(registerQuery) do if row[\"username\"] == username then exports.san_infobox:addNotification(player,\"Felhasználónév foglalt!\",\"error\") returnn end if row[\"mtaserial\"] == getPlayerSerial(player) and not serials[getPlayerSerial(player)] then exportss.san_infobox:addNotification(player,\"Ez a serial már kapcsolva van egy accounthoz!\",\"error\") return endendlocal registerInsert = dbQuery(connection, \"INSERT INTO accounts SET username = ?, password = ?, mtaserial = ?, ip = ?, regdate = NOW(), lastlogin = NOW(), email = ?\", username, password, getPlayerSerial(player), getPlayerIP(player), email)local result, num, insertID = dbPoll(registerInsert, -1)if insertID then exports.san_infobox:addNotification(player,\"Sikereses regisztráció! Mostmár bejelentkezhetsz!\",\"success\") setElementData(player, \"acc:id\", insertID) triggerClientEventt(player, \"login:setPlayerPanelState\", player, \"login\")endendaddEvent(\"onRegisterClick\", true)addEventHandler(\"onRegisterClick\", root, onRegisterClick)
[14:30:45] WARNING: san_accounts\\Szerver.lua:143: Bad argument @ \'dbQuery\' [Expected db-connection at argument 1, got nil] [14:30:45] WARNING: san_accounts\\Szerver.lua:143: Bad argument @ \'dbPoll\' [Expected db-query at argument 1, got boolean] [14:30:51] ERROR: san_accounts\\Szerver.lua:144: attempt to compare number with boolean [/quote] És ez itt a 144. sor: if #spawnQuery > 0 then
if #spawnQuery > 0 then
local spawnQuery = dbPoll(dbQuery(cnonnection, \"SELECT * FROM characters WHERE id = ?\", accId), -1)
local spawnQuery = dbPoll(dbQuery(connection, \"SELECT * FROM characters WHERE id = ?\", accId), -1)
Gondolom átment ezer emberen, sérülhetett is, véletlen belenyúlhattak, vagy trollok