[FREE] xnAnchor

anchorBoat, 75%

I know there are a few other anchor scripts out there, but they are either paid or overly complicated for such a simple thing. Very simple script, press ‘e’ (by default) to deploy an anchor in a boat and the same key to raise the anchor. Anchor can not be deployed on land or very shallow water, also can’t be deployed while the boat is moving over a configurable speed.

Copy xnAnchor to your resources folder and add the following to your server.cfg.

ensure xnAnchor; exec @xnAnchor/anchor.cfg

To configure the resource for your own needs you will need to edit the included anchor.cfg file in the resource. All the text can be changed to whatever you want, if you want to remove the text that pops up when getting in an anchored boat then remove the boatAnchoredText from the config, this’ll stop that message from appearing. The speedToDeploy is in KM/H.

The keybind is set to e by default but can be changed in the FiveM section of the keybind menu.

xnAnchor.zip (1.4 KB)


Nice work, Smallo :clap::sunglasses:

Hi !

Seems like a nice work but when I try to use it I always have an error about config.
Maybe because I just don’t really understand how a .cfg file works and how to use it but I tried to execute this .cfg file before and after starting your resource and still have error.

Do you have an idea ? :smiley:

Thank you !

ensure it from the server console if you try this from the client console this will be the result. otherwise 10/10 works perfect as per usual with smallo. Thanks for release dude, didn’t know SetForcedBoatLocationWhenAnchored paired with the others till now.

excellent stuff, glad to see a free release of this

Yep but … That’s the issue I’m facing when the resource is started from server.cfg, when I start it from server console or from client console …

Are you making sure you have exec @xnAnchor/anchor.cfg in your server.cfg like I said in the installation instructions?

Yes !

I tried to place it before and after the xnAnchor script. (xnAnchor is in [standalone] folder).


Ty :slight_smile:

Edit : Found what was the problem. When I tried to translate sentences in “anchor.cfg”, I put some special chars in my lang like “é” or “à” and that lead to an arguments mismatch error.

This tends to give a whirlpool effect when other players come near an anchored boat. Any ideas on if its the nature of the native or something else?

Haven’t seen that myself. I made the script in like 30 minutes and never tested with others. Could just be an artifact with sync and the game trying to predict movement. Not sure honestly. Not sure if these natives are even supposed to be used in a MP environment.

I’ll try and have a look into it when I get a chance.

1 Like

Kinda rude to come in here like that and make those sort of false accusations. You obviously have some other script that conflicts and causes issues. This works fine, I am able to spawn and drive vehicles fine.

Hi Smallo,

I see where you’re coming from. I can understand why my initial post might have seemed accusatory, and I apologize if it came off that way.

After further investigation, I discovered that the issue I was experiencing was due to a conflict with my new HUD, not your script. I’ve since deleted my previous post to prevent any confusion.

While I did find another script that works better for my setup, I appreciate the work you’ve put into this one. Different setups can lead to different experiences, and I hope my feedback can help others troubleshoot similar issues.

Thanks for understanding.