Jump to content

Search the Community

Showing results for tags 'exports'.

  • 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 6 results

  1. Map loader This is a map loader, which can let specific players download a map of choice. Maps will be generated clientside and the resource is capable of loading extreme large maps. Loading the map will be done with a speed the pc can handle. The code execution time will be reduced to circa 10 ms. Which is the frame time of a player with 100 fps. So technically when you have 100 fps you still have 98/100 fps when this resource is loading a map. But this is based on running only this resource and based on predictions/knowledge. Which you can't trust... The .map files are unloaded afterwards reading them. But the resource will keep a buffer of the processed data until no more players are using that map. This will speed up the resource when it is used for multiply players. The resource can be managed with the following functions (serverside): loadMapForTarget() Require: element player/root, string mapName Returns: boolean success, string message unloadMapForTarget() Require: element player/root, string mapName Returns: boolean success, string message getPlayerDownloadProgress() Require: element player Returns: int percentages or boolean false Version 1.0.1 or higher getPlayerMapStatus() Require: element player, string mapName Returns: string status or boolean false Status list: string "DOWNLOADING" -- Player is downloading the map. string "LOADING" -- Player is generating/loading the map string "LOADED" -- Player has loaded the map. boolean false -- Player value is invalid or the player hasn't started downloading this map. Events(serverside): "onPlayerLoadedMap" Source: element player Parameters: string mapName int loadTime "onPlayerUnloadedMap" Source: element player Arguments: string mapName Version 1.0.1 or higher "onPlayerCancelMapDownload" Source: element player Arguments: string mapName Events(clientside): "onClientPlayerLoadedMap" Source: element localPlayer Arguments: string mapName, int loadTime "onClientPlayerUnloadedMap" Source: element localPlayer Arguments: string mapName The same information about the functions and the events can be found inside the meta.xml Element types that are supported: objects, peds, vehicles, markers and pickups If you found any bugs, which might be in there. Don't be shy and let me know, I will exterminate them. And don't forget, this resource require some rights in order to read map files from other resources: DOWNLOAD 1.0.2 For developers a quick source code preview: Server Client
  2. Estou Tentando Fazer Um Sistema De Inventario, Mais Estou Com Um Problema, Seguinte Não Estou Conseguindo Usar As dxmessages Por Que Esta Dando Erro No Console: "exports: Call to non-running server resource (dxmessages) [string "?"] function dxMsg(source, text, type) exports.dxmessages:outputDx(source, text, type) end
  3. This is my problem ERROR: dayzmode/lib/team/s_team.lua:1: call: failed to call 'dayzconnect:MySQL' ERROR: dayzmode/lib/system/player.lua:1: call: failed to call 'dayzconnect:players' Im using this call ( getResourceFromName ( "dayzconnect" ), "MySQL", 1, "2", "three" ) <export function="MySQL"/> <include resource="dayzmap"/> <include resource="dayzmode"/> <include resource="dayzbase"/> <include resource="dayzcache"/> <include resource="object_preview"/> I do not know what to do anymore
  4. Hello, I am trying to export a function called "getRandomLoot", which is in a resource name NTTC_Tables, I am trying to export this function to be able to use it on another resource, the function: function getRandomLoot(location) local number = table.random(locations_for_items_and_spawns) --outputServerLog( number[1]..","..number[2]..","..number[3] ) local x,y,z = number[1], number[2], number[3] local position = getZoneName ( x, y, z, true ) table = [] table['x'] = x table['y'] = y table['z'] = z return table end <meta> <script src="async.lua" type="shared" /> <script src="client.lua" type="client" cache="false"/> <script src="locations.lua" type="server"/> <script src="server.lua" type="server"/> <export function="getRandomLoot" type="server" /> <export function="spawntables" type="server" /> </meta> This function returns what I want it to when I call it on the same file, but when I try to call this function from another resource: local checkres = exports["NTTC_Tables"]:getRandomLoot("Los Santos") --doesnt work ERROR: ERROR: [NTTC]/NTTC_Account_Management/server.lua:78: attempt to call a nil value [09:06:41] ERROR: [NTTC]/NTTC_Account_Management/server.lua:75: call: failed to call 'NTTC_Tables:getRandomLoot' [string "?"] Line 79 is a timer: function test() local checkres = exports["NTTC_Tables"]:getRandomLoot("Los Santos") --<<<<< line 75 --outputServerLog("X = "..checkres['x']..", Y = "..checkres['y']..", Z ="..checkres['z']) end setTimer( test, 500, 5) --<<<< line 78 I have no idea what is wrong, im running Ubuntu 18.04.1 LTS Thanks in advance EDIT: Found out that the problem is on my function "getRandomLoot" for some reason, it works in the resource no problem but when trying to call it, it shows the error message listed above, im trying to fix it on my own, will edit if I manage to fix it and will post the fix EDIT2: Tried removing the _ from the resource name, didnt fix
  5. Hi guys, im asking if i can get name of resource that called a function from another resource. --- function from resource1 function Func() outputChatBox("That function called by: ".. resourceName) -- print 'That function called by: resource2' end --- resource2 exports["resource1"]:Func()
  6. Hi guys I was looking into: call and I was wondering, for example; you have the function outputChatBox("") which works both client and server side with the same name. Will I be able to do the same with exports. Example; Client function drawDxStuff () --dx stuff end addEvent("drawDxStuff", true) addEventHandler("drawDxStuff", getRootElement(), drawDxStuff) Server function drawDxStuff() triggerClientEvent(source, "drawDxStuff", source) --source would probably be the player calling the function end Meta <export function="drawDxStuff" type="server"/> <export function="drawDxStuff" type="client"/> Would this work or will this give an error cause they have the same name or for other reasons? Kind Regards
×
×
  • Create New...