Jump to content

Search the Community

Showing results for tags 'loadstring'.

  • 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
  • Private Bugtracker
    • Private Bugs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 2 results

  1. dugasz1

    loadstring

    Hello! So i want to load external lua files in my resource and i do it with loadstring (Link). Like this: function loadLuaFile( path ) local file = fileOpen(path, true) if (not file) then outputChatBox("Failed") return else local string = "" local buffer while not fileIsEOF(file) do buffer = fileRead(file, 100) if (buffer) then string = string .. buffer end end loadstring(string)() end fileClose(file) end Loading a few script: loadLuaFile(":shar
  2. Hey, I have a problem with loading script files of maps into an environment. If a map uses "addEventHandler" to e.g. add the event "onClientMarkerHit" it most likely uses the "source" variable inside the attached function. However, this source variable does not exist in the scripts environment. The only way to still make it work at the moment is to let it have access to the _G environment, where the variable seems to exist. Is there a way to make it work without that? Bonsai
×
×
  • Create New...