Jump to content

xRGamingx

Members
  • Posts

    191
  • Joined

  • Last visited

Everything posted by xRGamingx

  1. xRGamingx

    [REL] UCD RPG

    Answer me please, Because you give me this error to me ? [2016-12-17 13:00:58] LOGIN: (Admin, Everyone) Jhon successfully logged in as 'Danny' (IP: 192.168.1.106 Serial: 55555558AA99D1E6217BC381372127B3) [2016-12-17 13:00:58] ERROR: [UDC]\UCDaccounts\login\server.lua:106: call: failed to call 'UCDlogging:new' [string "?"] [2016-12-17 00:37:38] ERROR: [UDC]\UCDchat\server.lua:72: call: failed to call 'UCDlogging:new' [string "?"]
  2. Hello friends, how can I make this button execute the / wp command when preloading it? adminPanel.button[31] = GuiButton(6, 232, 91, 21, "IG:Warp", false, adminPanel.tab[2])
  3. xRGamingx

    [REL] UCD RPG

    Hi noki. Because when writing in the Chat or to the logear I skip these mistakes [2016-12-17 13:00:58] LOGIN: (Admin, Everyone) Jhon successfully logged in as 'Danny' (IP: 192.168.1.106 Serial: 55555558AA99D1E6217BC381372127B3) [2016-12-17 13:00:58] ERROR: [UDC]\UCDaccounts\login\server.lua:106: call: failed to call 'UCDlogging:new' [string "?"] [2016-12-17 00:37:38] ERROR: [UDC]\UCDchat\server.lua:72: call: failed to call 'UCDlogging:new' [string "?"]
  4. I have problem with this, because it gives me that error? [2016-12-17 13:00:58] LOGIN: (Admin, Everyone) Jhon successfully logged in as 'Danny' (IP: 192.168.1.106 Serial: 55555558AA99D1E6217BC381372127B3) [2016-12-17 13:00:58] ERROR: [UDC]\UCDaccounts\login\server.lua:106: call: failed to call 'UCDlogging:new' [string "?"] [2016-12-17 00:37:38] ERROR: [UDC]\UCDchat\server.lua:72: call: failed to call 'UCDlogging:new' [string "?"]
  5. xRGamingx

    [REL] UCD RPG

    And how can I start doing that?
  6. Hello friends, why does this error throw me the login panel? if everything is fine What is the error.. local server ="127.0.0.1" local base ="Proyectotg" local user ="root" local contra="" function registrar(user,clave,correo) cnn = dbConnect( "mysql", "dbname="..base..";host="..server,user,contra,"share=2") res = dbQuery( cnn,"select count(codCuentas)as nombre from cuentas where usuario='"..user.."';") result = dbPoll( res, -1 ) if(result[1]["nombre"]==0)then serial = getPlayerSerial(source) res = dbQuery( cnn,"select count(codCuentas)as nombre from cuentas where serialPlayer='"..serial.."';") result = dbPoll( res, -1 ) if(result[1]["nombre"]<100)then a,b,c = tostring(math.random(100,800)),tostring(math.random(100,800)),tostring(math.random(100,800)) codigo = a..b..c fail= dbExec( cnn, "INSERT INTO cuentas(usuario,clave,correo,serialPlayer,codigo,cambio,can,activa) VALUES (?,?,?,?,?,?,?,?)",user,clave,correo,serial,codigo,0,0,0 ) if(addAccount(user,clave))then outputChatBox("Se creo l cuenta con exito Usuario="..user.." contraseña="..clave,source) setElementData(source,"usuario",user) setElementData(source,"clave",clave) enviar(codigo,correo,"Codigo+De+activacion",source) triggerClientEvent(source,"fActivar",source) else outputChatBox("Algo a salido mal contacta a un admin",source) end else outputChatBox("Solo puedes tener 2 cuentas",source) end else outputChatBox("La cuenta ya esta en uso",source) end end addEvent("registrar",true) addEventHandler("registrar",getRootElement(),registrar)
  7. ohhhhhhhhhhh broth Thankkksss Goodd
  8. xRGamingx

    [REL] UCD RPG

    Noki, What is the command for players to see their punishments given ?
  9. Hello friends, I have my server, and I want to do something, ejmp: If a player steals my script, and I want that script to not work on your server, I want the script to work only on my server how do I do that? I say this because I used some compiled script from a server and at the initial script on my server the script stops only
  10. xRGamingx

    Which way?

    How can I make the script not be downloaded to the user without having to compile them?
  11. But I do not know how to do that well, could you help me, my friend? I would appreciate
  12. I do not know how to place it here. function onEscapeBankZone(ele, matchingDimension) if (ele and ele.type == "player") then if (ele:getData("escapedbr") and ele.team.name == "Criminals") then exports.GTAdx:new(ele, "mission passed! $30,000 and 20 crim XP", 0, 255, 0) ---------mission passed! exports.GTAaccounts:SAD(ele, "crimXP", exports.GTAaccounts:GAD(ele, "crimXP") + 20) ele.money = ele.money + 30000 ele:removeData("escapedbr") exports.GTAstats:setPlayerAccountStat(ele, "successBR", exports.GTAstats:getPlayerAccountStat(ele, "successBR") + 1) end end end addEventHandler("onColShapeLeave", bankZone, onEscapeBankZone)
  13. Hello friends, How can I put this message as it is in this image? function onEscapeBankZone(ele, matchingDimension) if (ele and ele.type == "player") then if (ele:getData("escapedbr") and ele.team.name == "Criminals") then exports.TGdx:new(ele, "mission passed! $30,000 and 20 crim XP", 0, 255, 0)
  14. xRGamingx

    [REL] UCD RPG

    2016-12-10 21:28:31] ERROR: [UDC]\UCDaccounts\login\server.lua:106: call: failed to call 'UCDlogging:new' [string "?"] ------------------------------------------------------------------- --// PROJECT: Union of Clarity and Diversity --// RESOURCE: UCDaccounts --// DEVELOPER(S): Lewis Watson (Noki) --// DATE: 13.12.2014 --// PURPOSE: Handling player logins. --// FILE: \UCDaccounts\login\server.lua [server] ------------------------------------------------------------------- local db = exports.UCDsql:getConnection() local restricted = {"UCDhousing", "admin", "UCD", "UCDadmin", "nokizorque"} local matrixViewPositions = { -- Some UCD ones -- Silly :Os ty for the coords {1305.09973, -860.06250, 83.92583, 1418.49683, -803.08008, 80.69189}, {2081.45605, 1744.49878, 14.48063, 2166.39648, 1656.14502, 27.01394}, {2095.71826, 1374.67261, 52.45646, 1955.80347, 1342.64624, 8.55083}, {-2708.49219, 2108.61475, 95.03329, -2560.98022, 1746.29285, 7.38109}, {-1813.52527, 580.16193, 371.09628, -1807.63171, 493.84613, 55.5428}, {1862.90833, -1452.45300, 140.37985, 1528.33813, -1258.09937, 215.22653}, {1674.29980, -895.24408, 531.87439, 1659.51709, -982.78577, 39.61652}, {-903.80847, 1740.82678, 171.57216, -720.15826, 2015.47437, 56.53033}, -- My own bc I am god {1380.4105, -748.9726, 104.6013, 1460.8162, -1051.0956, 95.9769}, {2139.718, 1899.7533, 12.9899, 2034.3885, 1921.8209, 14.3957}, {-1211.5592, -2928.3223, 67.2434, -1071.653, -2823.7144, 46.9938}, {-1026.7146, -1613.5925, 89.238, -1123.5228, -1659.3414, 77.2198}, --{964.5377, 2575.6436, 23.3776, 993.2688, 2548.8789, 20.6946}, } local display = textCreateDisplay() local text = {} text[1] = textCreateTextItem("Welcome to the Union of Clarity and Diversity", 0.5, 0.2, "high", 255, 255, 255, 255, 2, "center", 0) text[2] = textCreateTextItem("Loading resources...", 0.5, 0.5, "high", 255, 255, 255, 255, 2, "center", 0) for i = 1, #text do textDisplayAddText(display, text[i]) textItemSetScale(text[i], 2) end function startMatrix() fadeCamera(source, true, 1.5) local x, y, z, lx, ly, lz = unpack(matrixViewPositions[math.random(#matrixViewPositions)]) setCameraMatrix(source, x, y, z, lx, ly, lz) showPlayerHudComponent(source, "all", false) showChat(source, false) setPlayerNametagColor(source, false) source.position = Vector3(0, 0, -5) source.frozen = true end addEventHandler("onPlayerJoin", root, startMatrix) function joinText() textDisplayAddObserver(display, source) end addEventHandler("onPlayerJoin", root, joinText) function removeLoginText() textDisplayRemoveObserver(display, client) end addEvent("UCDaccounts.removeLoginText", true) addEventHandler("UCDaccounts.removeLoginText", root, removeLoginText) -- Login handling function loginPlayer2(usr, passwd, plr) local plr = client -- REMOVE THIS LINE --[[ local result = exports.UCDsql:getForumDatabase():query("SELECT `member_name`, `passwd` FROM `smf_members` WHERE `member_name` = ? LIMIT 1", usr):poll(-1) if (not result or #result == 0) then if (not result) then exports.UCDdx:new(plr, "Database error - try again later", 255, 255, 255) return end exports.UCDdx:new(plr, "There is no account matching this name", 255, 255, 255) return end if (result[1].passwd ~= hash("sha1", usr:lower()..passwd)) then exports.UCDdx:new(plr, "Incorrect password", 255, 255, 255) return false end --]] -- Maybe have a label that you constantly need to update instead of using UCDdx if (getAccount(usr)) then if (getAccount(usr, passwd)) then if (getAccount(usr).player) then outputChatBox(plr.name.." is trying to log into your account. They have used a correct password. It is recommended you change your password or contact an admin.", getAccount(usr):getPlayer()) exports.UCDdx:new(plr, "This account is currently in use.", 255, 255, 255) triggerClientEvent(plr, "UCDaccounts.login.toggleLogin", plr) return else -- If we have a database error or table error, DO NOT :OING LOG THEM IN if (not accountData[usr]) then exports.UCDdx:new(plr, "We have encountered a database issue. Please contact an administrator.", 255, 255, 255) outputDebugString("Player "..plr.name.." could not log in - data is nil") triggerClientEvent(plr, "UCDaccounts.login.toggleLogin", plr) return false end if (exports.UCDadmin:isAccountBanned(usr)) then exports.UCDdx:new(plr, "This account is banned", 255, 255, 255) triggerClientEvent(plr, "UCDaccounts.login.toggleLogin", plr) return end triggerClientEvent(plr, "UCDaccounts.login.saveAccountCredentials", plr, usr, passwd) logIn(plr, getAccount(usr), passwd) exports.UCDlogging:new(plr, "login", "Logged into account: "..usr, plr.ip) exports.UCDdx:new(plr, "Welcome to UCD, "..tostring(plr.name), 255, 255, 255) end else exports.UCDdx:new(plr, "Incorrect password", 255, 255, 255) end else exports.UCDdx:new(plr, "There is no account matching this name", 255, 255, 255) end triggerClientEvent(plr, "UCDaccounts.login.toggleLogin", plr) end addEvent("UCDaccounts.login.logIn", true) addEventHandler("UCDaccounts.login.logIn", root, loginPlayer2) -- Registration here function registerPlayer2(usr, email, passwd, plr) local plr = client -- REMOVE THIS LINE for _, v in ipairs(restricted) do if (usr == v) then exports.UCDdx:new(plr, "You cannot register this account name because it is restricted", 255, 255, 255) return end end --]] if (not getAccount(usr)) then local addedAccount = exports.UCDaccounts:registerAccount(plr, usr, passwd, email) if (not addedAccount) then exports.UCDdx:new(plr, "An unknown error has occurred! Please choose a different account name/password and try again.", 255, 255, 255) triggerClientEvent(plr, "UCDaccounts.login.toggleRegisterConfirm", plr, true) return false end triggerClientEvent(plr, "UCDaccounts.login.hideRegistrationInterface", resourceRoot) -- Hides the window triggerClientEvent(plr, "UCDaccounts.login.showLoginInterface", resourceRoot) -- Shows login window exports.UCDdx:new(plr, "You have successfully registered! Account name: "..usr, 255, 255, 255) --exports.UCDdx:new(plr, "This account will also work on the forums - forum.ucdmta.com", 255, 255, 255) exports.UCDlogging:new(plr, "register", "registered account: "..usr, plr.ip) return true end end addEvent("UCDaccounts.login.register", true) addEventHandler("UCDaccounts.login.register", root, registerPlayer2) function login_handler() source:setData("isLoggedIn", true) source:setHudComponentVisible("all", true) source:setHudComponentVisible("vehicle_name", false) showChat(source, true) triggerClientEvent(source, "UCDaccounts.login.hideLoginInterface", source) triggerClientEvent(source, "UCDaccounts.login.destroyInterface", source) end addEventHandler("onPlayerLogin", root, login_handler) function isAccount(name) local msg, found for _, v in pairs(Account.getAll()) do if (v.name == name) then msg = "This account name is taken" found = true break elseif (v.name:lower() == name:lower()) then msg = "Account name exists with different case" found = true break end end if (found == true) then triggerClientEvent(client, "UCDaccounts.login.updateValidationLabel", client, msg, true) else triggerClientEvent(client, "UCDaccounts.login.updateValidationLabel", client, "Available account name", false) end end addEvent("UCDaccounts.login.isAccount", true) addEventHandler("UCDaccounts.login.isAccount", root, isAccount) --[[ addEvent("UCDaccounts.fetchUpdates", true) addEventHandler("UCDaccounts.fetchUpdates", root, function () if (client) then local updates = fetchRemote("") end end ) ]]
  15. xRGamingx

    [REL] UCD RPG

    The ucd logging error is solved, but I get this error when using the chat say.. [2016-12-10 20:59:56] ERROR: [UDC]\UCDchat\server.lua:72: call: failed to call 'UCDlogging:new' [string "?"] -- LOTE filter --[[ local chars = { -- Arabic alphabet "غ", "ظ", "ض", "ذ", "خ", "ث", "ت", "ش", "ر", "ق", "ص", "ف", "ع", "س", "ن", "م", "ل", "ك", "ي", "ط", "ح", "ز", "و", "ه", "د", "ج", "ب", "ا", } function getForeignLetters(str, customLength) local c = 0 local charNum = {} local stringLength = customLength or #str for i = 1, #str do for ind, character in ipairs(chars) do if (ind >= 1 and ind <= 28 and not customLength) then if (#str > 1) then return getForeignLetters(str, #str / 2) end return end if (string.byte(str:sub(i, i)) == string.byte(character)) then --outputDebugString(character) c = c + 1 table.insert(charNum, ind) end end end return c, charNum end --]] local antiSpam = {} local antiSpamTime = 2000 -- Time in ms that we don't allow a player to speak after have already spoken function clearAntiSpam(player) if (antiSpam[player]) then antiSpam[player] = nil end end -- Main chat zones, team chat and /me function onPlayerChat(message, messageType) cancelEvent() if (message:gsub(" ", "") == "") then return end if (message:find("ucd")) then message = message:gsub("ucd", "UCD") end onPlayerChat2(source, message, messageType) end addEventHandler("onPlayerChat", root, onPlayerChat) function onPlayerChat2(player, message, messageType) if (antiSpam[player]) then exports.UCDdx:new(player, "Your last sent message was less than two seconds ago!", 255, 0, 0) return end if (message:find("%x%x%x%x%x%x")) then message = message:gsub("%x%x%x%x%x%x", "") end if (exports.UCDaccounts:isPlayerLoggedIn(player)) then -- if main chat local nR, nG, nB = player:getNametagColor() local coord = player:getPosition() if (messageType == 0) then local sourceCity = exports.UCDutil:getPlayerCityZone(player) outputChatBox(--[["("..sourceCity..") "..--]]player.name.."#FFFFFF "..message, root, nR, nG, nB, true) antiSpam[player] = true setTimer(clearAntiSpam, antiSpamTime, 1, player) exports.UCDlogging:new(player, "Main", message, sourceCity) --triggerClientEvent("listInsert", resourceRoot, "main", player, message) listInsert(root, "main", player, message) -- if team chat elseif (messageType == 2) then local t if (message:sub(1, 1) == "/") then executeCommandHandler(message:sub(2, #message), player) return end for _, v in pairs(player.team:getPlayers()) do outputChatBox("(TEAM) "..player.name.."#FFFFFF "..message, v, nR, nG, nB, true) end antiSpam[player] = true setTimer(clearAntiSpam, antiSpamTime, 1, player) exports.UCDlogging:new(player, "Teamchat", message, t) --triggerClientEvent(player.team:getPlayers(), "listInsert", resourceRoot, "team", player, message) listInsert(player.team:getPlayers(), "team", player, message) -- if /me chat elseif (messageType == 1) then for _, v in ipairs(Element.getAllByType("player")) do if (v ~= player) then local p = v.position if (exports.UCDutil:isPlayerInRangeOfPoint(player, p.x, p.y, p.z, 100)) then if (player.dimension == v.dimension) and (player.interior == v.interior) then outputChatBox("* "..player.name.." "..message, v, 200, 50, 150) end end end end outputChatBox("* "..player.name.." "..message, player, 200, 50, 150) antiSpam[player] = true setTimer(clearAntiSpam, antiSpamTime, 1, player) exports.UCDlogging:new(player, "/me", message) end else return false end end function supportChat(plr, _, ...) if (not exports.UCDchecking:canPlayerDoAction(plr, "Chat")) then return false end local msg = string.gsub(table.concat({...}, " "), "%x%x%x%x%x%x", "") if (not msg or string.gsub(msg, " ", "") == "") then exports.UCDdx:new(plr, "Enter a message!", 255, 0, 0) return end outputChatBox("(SUPPORT) "..plr.name.." #ffffff"..msg, root, 0, 155, 0, true) exports.irc:ircSay(exports.irc:ircGetChannelFromName("#ucd.echo"), "13(SUPPORT) "..plr.name.." "..msg) exports.UCDlogging:new(plr, "support", msg) --triggerClientEvent("listInsert", resourceRoot, "support", plr, msg) listInsert(root, "support", plr, msg) end addCommandHandler("support", supportChat) local advertSpam = {} addCommandHandler("advert", function (plr, _, ...) if (not exports.UCDchecking:canPlayerDoAction(plr, "Chat")) then return false end if (advertSpam[plr.account.name] and getTickCount() - advertSpam[plr.account.name] <= (30 * 60000)) then exports.UCDdx:new(plr, "You can advert once per 30 minutes", 255, 0, 0) return false end local msg = string.gsub(table.concat({...}, " "), "%x%x%x%x%x%x", "") if (not msg or string.gsub(msg, " ", "") == "") then exports.UCDdx:new(plr, "Enter a message!", 255, 0, 0) return false end outputChatBox("(ADVERT) "..plr.name.." #ffffff"..msg, root, 255, 255, 0, true) exports.irc:ircSay(exports.irc:ircGetChannelFromName("#ucd.echo"), "8(ADVERT) "..plr.name.." "..msg) exports.UCDlogging:new(plr, "advert", msg) advertSpam[plr.account.name] = getTickCount() end )
  16. xRGamingx

    [REL] UCD RPG

    Look debugscript 3 2016-12-10 20:52:13] restart: Resource restarting... [2016-12-10 20:52:13] Stopping UCDlogging [2016-12-10 20:52:13] Resource 'UCDlogging' changed, reloading and starting [2016-12-10 20:52:13] Starting UCDlogging [2016-12-10 20:52:13] SCRIPT ERROR: [UDC]\UCDlogging\logging.slua:61: <name> or '...' expected near '"risk"' [2016-12-10 20:52:13] ERROR: Loading script failed: [UDC]\UCDlogging\logging.slua:61: <name> or '...' expected near '"risk"' [2016-12-10 20:52:13] UCDlogging restarted successfully. ------------------------------------------------------------------- --// PROJECT: Union of Clarity and Diversity Alpha --// RESOURCE: UCDlogging --// DEVELOPER(S): Lewis Watson (Noki) --// DATE: 08.01.15 --// PURPOSE: To create logs of everything for future reference. --// FILE: UCDlogging\logging.slua [server] ------------------------------------------------------------------- local stdLogged = 0 local db = exports.UCDsql:getConnection() --[[ function adminLog() end function stdLog(plr, type1, action, type2) if (not plr) or (not type1) or (not action) then return nil end if (plr:getType() ~= "player") or (type(type1) ~= "string") or (type(action) ~= "string") then return false end if (not type2) then type2 = "N/A" end end --]] function adminLog(admin, log_) local t = getRealTime().timestamp db:exec("INSERT INTO `adminlog` (`name`, `log_`, `datum`) VALUES (?, ?, ?)", admin, log_, t ) end function new(plr, type1, action, type2) if (not plr or not type1 or not action) then return nil end if (type(type1) ~= "string" or type(action) ~= "string") then return false end if (not type2) then type2 = "N/A" end local name local accname local serial if (isElement(plr) and plr.type == "player") then name = plr.name accname = plr.account.name serial = plr.serial else name = tostring(plr) accname = "N/A" serial = "N/A" end db:exec("INSERT INTO `logging` SET `name`=?, `acc`=?, `type`=?, `type2`=?, `tick`=?, `action`=?, `serial`=?", name, accname, type1, type2, getRealTime().timestamp, action, serial ) function Account("risk").player if (risk) then local logs = db:query("SELECT * FROM logging"):poll(-1) local send = {} for i, log in ipairs(logs) do if (i >= #logs - 50) then table.insert(send, log) end end triggerClientEvent(risk, "logsView", resourceRoot, send) end stdLogged = stdLogged + 1 return true end function outputTotal(reset) if stdLogged ~= 0 then outputDebugString("[UCDlogging] Total standard logs inserted in the past 5 minutes: "..stdLogged) end if (reset) then stdLogged = 0 end end setTimer(outputTotal, 60000 * 5, 0, true) addCommandHandler("logged", outputTotal) ------------------- -- Some stuff we need to log ------------------- function logConnections() -- The account will be guest, so we don't need to worry about the query not being successful new(source, "join", "Joined server", source.ip) end addEventHandler("onPlayerJoin", root, logConnections) function logDisconnections(quitType) new(source, "quit", "Disconnected from server ["..quitType.."]", source.ip) end addEventHandler("onPlayerQuit", root, logDisconnections)
  17. xRGamingx

    [REL] UCD RPG

    Broth Noki, Thanks!! Look Why give the error? error debugscript 3 [2016-12-10 20:21:27] ERROR: [UDC]\UCDchat\server.lua:72: call: failed to call 'UCDlogging:new' [string "?"] [2016-12-10 19:53:24] ERROR: [UDC]\UCDchat\local.lua:43: call: failed to call 'UCDlogging:new' [string "?"] [UDC]\UCDaccounts\misc.lua:29: call: failed to call 'UCDlogging:new' [string "?"] http://subefotos.com/ver/?17c36b3b5d17b74eb4723436a56471c8o.png Look broth
  18. Can you help me create fake players name on the scoreboard without them being in gameplay form on the server?
  19. I want to leave said to appear in scoreboard names of players who are not playing on the server,
  20. Hi friends, Someone knows how to make players appear on the scoreboard, players without being in the sv, would be like bost
×
×
  • Create New...