Jump to content

1LoL1

Members
  • Posts

    944
  • Joined

  • Last visited

Everything posted by 1LoL1

  1. setPlayerNametagShowing
  2. Post the code.
  3. Any error/warning?
  4. addEventHandler("onPlayerLogin", getRootElement(), function (_, acc) if getAccountData(acc, "wb") then outputChatBox("Welcome back!") else setAccountData(acc, "wb", "test") outputChatBox("Welcome new player!") end end)
  5. 1LoL1

    help

    TAPL
  6. Try this but start in 800x600 resolution. x, y = guiGetScreenSize() rx, ry = (x/800), (y/600) image = guiCreateStaticImage(rx*640, ry*360, rx*1980, ry*1280, "login_bg.png",false)
  7. dbExec ( sql, "CREATE TABLE IF NOT EXISTS selling (userid INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, item VARCHAR(30), amount INT(6), price INT(6))" )
  8. Post the "onSpawnPoliceOfficerLS"
  9. local players = getPlayerTeam(source) if players and getTeamFromName("DX") == players then setElementModel(source, id) else setElementModel(source, 0)
  10. 1500 is a timer.
  11. It's marker not market. marker = createMarker( x, y, z, "cylinder", 1.5, 255, 255, 0, 170 ) addCommandHandler("move", function () moveObject(marker, 1500, x, y, z) end)
  12. What is function open?
  13. He used in all setAccountData so why givePlayerMoney? and setAccountData data is saved in account.
  14. Try this: addEventHandler("onPlayerChat", getRootElement(), function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) local msg = msg:gsub("#%x%x%x%x%x%x", "") outputChatBox(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")..": #FFFFFF"..msg, getRootElement(), r, g, b, true) outputServerLog( "CHAT: " .. name .. ": " .. msg ) end end))
  15. Try this: local g_Vehicle = getPedOccupiedVehicle( localPlayer ) local nitro = tostring(getVehicleNitroLevel(g_Vehicle))
  16. 1LoL1

    Script warp

    addCommandHandler("go", function (source) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Group")) then setElementPosition(x, y, z) else outputChatBox("text...", source, 255, 255, 255, true) end)
  17. Where?
  18. i used this too but save or load not work
  19. Hello, i tried save and load with executeSQLQuery but idk why not work. Errors / Warnings: Warning: Bad argument @ 'getAccountName' [Expected account at argument 1, got player] Error: Database query failed: no such column: false addEventHandler("onPlayerQuit", getRootElement(), function () if isGuestAccount(getPlayerAccount(source)) then return end local account = getAccountName(getPlayerAccount(source)) local TEST1 = (getElementData(source, "TEST1") or 0) local TEST2 = (getElementData(source, "TEST2") or 0) local TEST3 = (getElementData(source, "TEST3") or 0) local searchForAPlayer = executeSQLQuery("SELECT TEST1, TEST2, TEST3 FROM Avengers WHERE Account = ?", account) if #searchForAPlayer == 0 then executeSQLQuery("INSERT INTO Avengers (Account, TEST1, TEST2, TEST3) VALUES (?, ?, ?, ?)", account, TEST1, TEST2, TEST13) else executeSQLQuery("UPDATE Avengers SET TEST1 = ?, TEST2 = ?, TEST3 = ? WHERE Account = ?", TEST1, TEST2, TEST3, account) end end) addEventHandler ("onPlayerLogin", getRootElement(), function () local account = getAccountName(source) local searchForAPlayer = executeSQLQuery("SELECT TEST1, TEST2, TEST3 FROM Avengers WHERE Account = ?", account) if #searchForAPlayer == 1 then setElementData(source, "TEST1", searchForAPlayer["TEST1"]) setElementData(source, "TEST2", searchForAPlayer["TEST2"]) setElementData(source, "TEST3", searchForAPlayer["TEST3"]) end end)
  20. No you can't if i'am wrong so sorry. But you can use setElementFrozen if not work then idk sorry.
  21. Errors/Warnings in /debugscript 3?
  22. 1LoL1

    Solved..

    It's fixed.. and poll["Nicks"] ? where is poll?
  23. 1LoL1

    Solved..

    Fixed by me. Solved.
  24. 1LoL1

    Solved..

    Not work. ERROR: bad argument #1 to 'find' (string expected, got nil)
  25. 1LoL1

    Solved..

    Hello, can anyone help me why i have this error? ERROR: attempt to index local 'q' (a userdata value) function whenPlayerChangeNick(_, newNick) local newNick = removeHexColorCode(newNick) local serial = getPlayerSerial(source) local q = dbQuery(database,"SELECT * FROM Nick WHERE Serial = ?", serial) local poll, rows = dbPoll(q, -1) if (rows == 1) then local actualNicks = q["Nicks"].nicks if string.find(actualNicks, newNick) then else local addNewNick = actualNicks .. ", " .. newNick dbExec(database, "UPDATE Nick SET Nicks = ? WHERE Serial = ?", addNewNick, serial) end end end addEventHandler("onPlayerChangeNick", getRootElement(), whenPlayerChangeNick)
×
×
  • Create New...