TheMOG

Members
  • Content Count

    514
  • Joined

  • Last visited

  • Days Won

    1

TheMOG last won the day on January 10

TheMOG had the most liked content!

Community Reputation

40 Good

4 Followers

About TheMOG

  • Rank
    Playa Partner
  • Birthday 14/05/1998

Recent Profile Visitors

2,069 profile views
  1. TheMOG

    [HELP] custom zones and names

    Try this -- [ Zone ] local DefZoneToNew = { ["YourNewZoneName"] = "OldZoneName", } function getPlayerZone(element) local x, y, z = getElementPosition(element) local location = getZoneName(x, y, z) if DefZoneToNew[location] then return DefZoneToNew[location] else return location end end -- [ City ] local DefCityToNew = { ["YourNewCityName"] = "OldCityName", } function getPlayerCity(element) local x, y, z = getElementPosition(element) local location = getZoneName(x, y, z, true) if DefCityToNew[location] then return DefCityToNew[location] else return location end end addEventHandler("onClientRender", root, function() dxDrawText(getPlayerZone(localPlayer).." City: "..getPlayerCity(localPlayer), x,y, 20, 80, 1, "default") end)
  2. TheMOG

    Press TAB to skip guiEdits

    you using guiSetInputEnabled? If not, it should work as default.
  3. TheMOG

    Multiple commands bind

  4. TheMOG

    [HELP] DX SCROLL

    Anyone please ?
  5. TheMOG

    [HELP] DX SCROLL

    Hi! I'm trying to calculate the position for a scrolling bar. I tried so many way, but i just failed. After wasted 2 hours for nothing, can anybody help me please ? If needed, i'll post the code. I have a bg and i want the scrolling bar working with that. local screenSize = {guiGetScreenSize()} local panelW, panelH = 500, 300 local panelX, panelY = screenSize[1]/2-panelW/2, screenSize[2]/2-panelH/2 maxDraw = 5 --currentRow is when scrolling. Thats + 1 or -1 dxDrawRectangle(panelX - 40, panelY, 10, panelH, tocolor(0, 0, 0, 220)) -- BG dxDrawRectangle(panelX - 40, panelY + currentRow * maxDraw / #weaponTable, 10, 40, tocolor(0, 200, 0, 190))
  6. TheMOG

    Draw This for Any Resolution [HELP]

    using elementDatas in render = getting the same data every second 60 times
  7. TheMOG

    About ban...

    Maybe you can, but the best solution for this, make your own ban system
  8. TheMOG

    [PROBLEM] Some players can´t click on GUI Elements

    If you can post the half of the code, maybe we can help you better.
  9. TheMOG

    [PROBLEM] Some players can´t click on GUI Elements

    The problem can be the script calling an elementData, can be getElementData(localPlaye, "PlayerLoggedin") , or something else, and u don't set it to a player before calling it.
  10. TheMOG

    [PROBLEM] Some players can´t click on GUI Elements

    is the script not calling any getElementData ?
  11. TheMOG

    [PROBLEM] Some players can´t click on GUI Elements

    check the debug when tryin to click on that
  12. TheMOG

    [Help]Account-system

    Edit mine. local DisabledCharacters = "[\\/\\\\\"\\]\\[\\'\\-{}^$*+?,;:!£%&()_=@#~,<.>?]" addEvent("sourceRequest[Register]", true) addEventHandler("sourceRequest[Register]", root, function(username, password) if (client) and (client == source) then local playerSerial = getPlayerSerial(source) if username and #username > 3 and password and #password > 3 then if not pregFind(username, DisabledCharacters) and not pregFind(password, DisabledCharacters) then dbQuery(function(queryHandler, source) local result, rows = dbPoll(queryHandler, -1) for _, data in ipairs(result) do if data["Username"] == username then outputChatBox("This username already in use") return end if data["Serial"] == playerSerial then outputChatBox("You already have an account") return end end -- YOUR DBEXEC HERE outputChatBox("Successfully registered!") end, {source, username, password}, mysql:getConnection(), "SELECT * FROM accounts") else outputChatBox("You can't use special characters!") end else outputChatBox("Username / password must be 3 character") end end end)
  13. TheMOG

    fromJSON + tables problem

    If you using this: - If you have a high player count, it's can cause some lag. local r1 = dbPoll(dbQuery(db, "SELECT * FROM sticks WHERE ID = ? AND model = ?", id, getElementModel(source)), -1) -- I prefer dbQuery(function(id, query) local result, row, _ = dbPoll(query, -1) -- here you can use for k, value in ipairs(result) do -- or simple sticker = result[1] end, {id}, db, "SELECT * FROM stickers WHERE ID=? AND model=?", id, getElementModel(source))
  14. TheMOG

    [HELP] only A to Z and 0 - 9

    Thanks again, sorry