Jump to content

1LoL1

Members
  • Posts

    944
  • Joined

  • Last visited

Everything posted by 1LoL1

  1. addEventHandler("onPlayerLogin", getRootElement(), function (_, acc) if getAccountData(acc, "wb") then outputChatBox("Welcome back!") else setAccountData(acc, "wb", "test") outputChatBox("Welcome new player!") end end)
  2. 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)
  3. 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))" )
  4. Post the "onSpawnPoliceOfficerLS"
  5. local players = getPlayerTeam(source) if players and getTeamFromName("DX") == players then setElementModel(source, id) else setElementModel(source, 0)
  6. 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)
  7. He used in all setAccountData so why givePlayerMoney? and setAccountData data is saved in account.
  8. 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))
  9. Try this: local g_Vehicle = getPedOccupiedVehicle( localPlayer ) local nitro = tostring(getVehicleNitroLevel(g_Vehicle))
  10. 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)
  11. i used this too but save or load not work
  12. 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)
  13. No you can't if i'am wrong so sorry. But you can use setElementFrozen if not work then idk sorry.
  14. 1LoL1

    Solved..

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

    Solved..

    Fixed by me. Solved.
  16. 1LoL1

    Solved..

    Not work. ERROR: bad argument #1 to 'find' (string expected, got nil)
  17. 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...