[Release] Object Loader (loads map .xml files)

I upgraded my server to FX and this script does not work anymore, could someone help me?

I also have the same problem, I updated the version and the maps do not load anymore

Have you tried replacing ‘files(…)’ with ‘file(…)’ in the map resource.lua file?

1 Like

I just got my files and put in the FX server is something wrong?

This is a resource for FiveReborn that loads object files from Map Editor (and some “Spooner” format) on clients.

Uh…

This is a resource for FiveReborn

I think I found your problem.

It either needs to be updated for FX-Server or it likely will not work. :stuck_out_tongue:

Just had a peak at the code, there is no files(…) in the resource.lua.

Looks like he uses dependency as a keyword rather than exports. @Boss can perhaps update it to match fx-server but that’s his perogative. It is open source so anyone can just go ahead and fix it up if they have the time.

i mean eventually the regular server will be gone go this kinda needs updating

There’s only 3 lines of server script involved and those still would work for FXS, the rest is client script which hasn’t changed.

If looking at the example map resources (which you clearly didn’t or you’d have seen there’s ‘files’ in there) you’ll see it say ‘files’ which needs replacing with ‘file’ as ‘files’ doesn’t accept, you know, a single file.

https://wiki.fivem.net/wiki/Resource_manifest#dependency

Okay, I was looking at the main two __resource.lua scripts and neither had files in it. I didn’t know the nesting map examples were all their own entity. My bad.

For me some of the props on the example maps (giant tubes, ramps, and some flat platforms) have no collision but give me a speedboost. The speedboost makes me slow down like the red slow down things do. I have no idea whats causing this, it never used to happen. The slow down things give me a speed boost as well.

1 Like

Just so other people know, this is the fix for converting to FXServer.

2 Likes

@Maxbr @origintk
if map not load you need to remove some letter that what @strontium said, let me explain
inside example map you will be have 2 files in _resource.lua you need to change
c:\Fxserver\resource\[Example]\any map you want

local function object_entry(data)
	dependency 'object-loader'

	files(data)
	object_file(data)
end

object_entry 'map.xml'

to

local function object_entry(data)
	dependency 'object-loader'

	file(data)
	object_file(data)
end

object_entry 'map.xml'

that is no need to update

2 Likes

Does this work for FX server Now ?

Yes it’s work now :+1::+1:

2 Likes

How do you install this mod? Because I can not install or use it

I can’t Include the Maps of the Map editor in the FX Server

We followed what is on the thread, but it doesn’t work

Regards

Have you tried getting one of the examples working before you tried your own?

It didnt work on our official server

Also you’ll need a metadata node. From the chilliad example:

<Metadata>
    <Creator>Zorg93 / drp4lyf</Creator>
    <Name>Stunt - Chiliad</Name>
    <Description>The Chiliad race track from the Cunning Stunts DLC</Description>
    <LoadingPoint xsi:nil="true" />
    <TeleportPoint>
      <X>740.928</X>
      <Y>5656.781</Y>
      <Z>776.246</Z>
      <Heading>120.031</Heading>
    </TeleportPoint>
  </Metadata>

Pasting this to any other valid Map Editor thing should make it work.

Edit:
Actually nvm reloading the resource a bunch of times made this error go away so idk what the heck is wrong.