Jump to content

Search the Community

Showing results for tags 'savesystem'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 1 result

  1. This error always happens when someone login. WARNING: savesystem\server.lua:56: Expected number, got non-convertible string. This warning may be an error in future versions. [DUP x3] ---------------------------------------------------------------------------------------------------- --- TABLES --- ---------------------------------------------------------------------------------------------------- local antiSpamSave = { } local setting = { } ---------------------------------------------------------------------------------------------------- --- SETTINGS --- ---------------------------------------------------------------------------------------------------- -- Save Data Setting setting.position = not get("position") == "false" and toJSON(split(get("position"), ", ")) or false setting.rotation = tonumber(get("rotation")) or false setting.interior = tonumber(get("interior")) or false setting.dimension = tonumber(get("dimension")) or false setting.team = tostring(get("team")) or false setting.skin = tonumber(get("skin")) or false --setting.data = not get("elementData") == "false" and split(get("elementData"), ", ") or false -- Other Setting setting.loadOnStartResource = not get("loadOnStartResource") == "false" and true or false setting.saveCommand = not get("saveCommand") == "false" and true or false setting.saveTime = tonumber(get("rotation")) or false ---------------------------------------------------------------------------------------------------- --- CUSTOM EVENTS --- ---------------------------------------------------------------------------------------------------- addEvent("onAccountLoadData", true) addEventHandler("onAccountLoadData", root, function (account) local position = getAccountData(account, "position") or setting.position local rot = getAccountData(account, "rotation") or setting.rotation local int = getAccountData(account, "interior") or setting.interior local dim = getAccountData(account, "dimension") or setting.dimension local teamName = getAccountData(account, "team") or setting.team local skin = getAccountData(account, "skin") or setting.skin local health = getAccountData(account, "health") local armor = getAccountData(account, "armor") local money = getAccountData(account, "money") local wanted = getAccountData(account, "wantedlevel") local clothes = getAccountData(account, "clothes") local stats = getAccountData(account, "stats") local weapons = getAccountData(account, "weapons") --local datas = getAccountData(account, "datas") local x, y, z = unpack(fromJSON(position) or {nil}) local team = teamName and getTeamFromName(teamName) or nil if position then spawnPlayer(source, x, y, z, rot, skin, int, dim, team) end if health then setElementHealth(source, health) end if armor then setPedArmor(source, armor) end if money then setPlayerMoney(source, money) end if wanted then setPlayerWantedLevel(source, wanted) end if (clothes) then removeAllPedClothes(source) for _, clothes in pairs(fromJSON(clothes)) do local type, texture, model = unpack(clothes) addPedClothes(source, type, texture, model) end end if (stats) then for stat, value in pairs(fromJSON(stats)) do setPedStat(source, stat, value) end end if (weapons) and not (isPedDead(source)) then takeAllWeapons(source) for weapon, ammo in pairs(fromJSON(weapons)) do giveWeapon(source, weapon, ammo, true) end end ... ... ...
×
×
  • Create New...