Harbor crane


I tried to recreate the harbor crane from the story mission Scouting the Port. There are some features that I couldn’t create, I’m hoping that the community will contribute to this release to make it better.

You’re more than welcome to include it in your own resource. But if you do, please credit everyone who contributes to this release by linking to this post.

Thank you @NovelaxNeko for making the cables shorter.

Video:

Download:

Report bugs
Please, if you find a bug, create an issue at this repo on GitHub. Not here on the forums. It’s so much easier to keep track of issues that way. This means that I won’t help you if you’re asking for help in this thread, use GitHub!

Ideas for the community: (If I won’t be able to solve them)

  1. Replace the cable prop with actual ropes by using the AddRope native. I however couldn’t add them, this needs a bit more investigating. The result without the ropes are good enough for now.

  2. Remove the default containers that’s in the area where the crane operates to be able to see all the spawned containers.
    Here’s the ymap that I could find: po1_02_long_0.ymap. I’m not that great with maps and 3D programs.

  3. Decrease the animation time on exiting the cabin. It takes a couple of seconds before it starts which makes the whole animation last for about 8 seconds. I’ve tried various things to decrase it without success.

  4. Fix z value when detaching a container so it won’t go through other containers. It currently works if you detach it directly above another container.
    Maybe add collision to the containers somehow? I had to disable it since it seems to be colliding with the lifter and that causes it to spawn to the side of it, not directly under it.

  5. When moving the whole crane back and forth the player ped seems to be moving around. I’m sure this could be solved somehow, I’m just unsure how at the moment.

I will update this list if someone contributes to it and I will of course mention your name.

Here’s the mission script if anyone is interested in that:
https://raw.githubusercontent.com/root-cause/v-decompiled-scripts/master/docks_setup.c

I’m unsure if I’m supposed to put this in the release category because of the huge list. But since most of the crane function as it should I guess it should be enough to put it here.

19 Likes

That looks very nice!

damn dude NICE release :slight_smile: keep up the good work

Really cool to see people recreating gta stuff! good job

Awesome dude:)

Hey

I can’t install it, the crane doesn’t spawn on FiveM server

Why not use a switch case in the useCrane() function ?

You know… You could make a pull request instead of asking that question? But yeah I’m not sure how I would make a switch statement with all the different keys. Is there some global keypress native that I’m not aware of?

Where have you been before broo. Been thought about this for a long time

Awesomee maan, great job, really!!! Can you put a heading to the entire frame?, trying to put the crane in other place but i cant find how to rotate the entire crane. Thank you n.n

holy crab maaaaan. thats unbelivable. holy moly. i cant get that smile out off my face :rofl: :heart_eyes: :smiling_face_with_three_hearts:

Very cool release. Interesting that its done with just objects. Ive been developing a physics simulator for the bucket of an excavator which doesnt come with collisions. Will try to take this further and in lua

Is this able to work in single player?

I doubt it, as its a mod for fivem running a lua script, but i’m sure there is single player mods available for this at the correct adresses.