[Standalone] [Paid] Sit Anywhere

Will this work with qtarget?

It does support qtarget!

Hello, my sit doesn’t seem to work properly. Does it support ESX?

Hello!

Sorry to hear that the script isn’t working for you, could you share some more information surrounding the issue? Are there any errors for example? And what isn’t exactly working?

And for the ESX part:
The script is standalone, which means it doesn’t rely on any other scripts/frameworks for it to function (some functionalities might require external scripts, however, the script will work perfectly fine by itself). You can use the script both with or without ESX present on your server.

Hello!
If the plug-in supports the ESX framework, how can I configure it? What should I do? If it’s convenient, can you teach me this step?
My server console doesn’t seem to have found any errors, nor does the client console. However, when I enter /sit on the client, it seems that nothing has happened. I will be prompted in the window that it is not a valid command. I look forward to your reply! thank you

image.png

MadsL via Cfx.re Community <thiscamefrom@fivem.net> 于2022年6月23日周四 03:18写道:

hey,

try to make v_res_trev_framechair that you can sit down. unfortunately the script does not recognize the ModelID that the objects are displayed.
What is the reason for this?

regards

Hey, the script doesn’t use any ESX features so there is no need to set anything up regarding that.

I’m unsure what’s exactly wrong when it comes to the command not being “valid”, I would presume that something went wrong when the script got loaded. I would advise you to check through the Config file and set everything to how you are going to use it.

So for example, you should set Config.Target to false if you arent using any 3rd eye/targeting scripts.

Other than that I would check again for any errors, alternatively, you could add a print("test") at the bottom of the client.lua file and see if it prints it to the client console (restart the script when you are in-game). If it doesn’t print “test” then the file didn’t load. If it did something else is horribly wrong.

Hello!
I tested it out and it worked perfectly fine for me.

I added it like this inside the Models table in list.lua:

[-1200941518] = { sit = { type = 'chair', seats = {[1] = vector4(0.0, -0.01, 0.51, 180.0)} } }, -- v_res_trev_framechair

I’m unsure why the script didn’t recognize it for you. One thing to remember is that you need to put the hash of the model inside the brackets.

If you don’t know the hash then you could also do something like this:

[GetHashKey("v_res_trev_framechair")] = { sit = { type = 'chair', seats = {[1] = vector4(0.0, -0.01, 0.51, 180.0)} } }, -- v_res_trev_framechair

I hope that helps!

Thanks for your help :wink:

I understand how this works only that does not appear with me, I’m trying there a MLO (Lucky Plucker) to make the chairs sitable, I’m sure that it is also the chairs with the name “v_res_trev_framechair”, I’ve written to the MLO creator times and asked if he knows what this can be xD with his sofa I had also done it and there it worked without problems :slight_smile:

Is it possible to disable the “E” key entirely if the third eye method is enabled? Because currently, some job menu are accessible using that same key but then it goes to sit on a nearby chair :sweat_smile:

successful

Hello!
As of now, there isn’t any “E” key that will make you sit down as far as I’m aware. Are you sure that you haven’t made a custom keybinding or something along those lines? I could be mistaken, but the current version only has keymapping to get up and requires using a command or the 3rd eye to sit down.

Now, I will be releasing an update here pretty soon (I’ll post about it), could you download that one and see if you still got the same issue?

Update!
I did say in my previous update post that I would’t be updating the script for a while, however I’ve gotten some new ideas since prompts were asked about.

So I’ve made a prompts system for those who want to use that (disabled by default, set Config.UsePrompts to true). Now, I do have to warn you that it does use more resources than just using the commands/3rd eye (the prompts use anywhere between 0.01 to 0.04 ms depending on where you are (and 0.08 ish when having a prompt displayed.)).

I’ve also done some other things to the script, see the changelog below for a complete list.

Changelog for 1.0.5:

  • Added prompt system
  • Adjusted some offsets for a couple of sit models
  • The script sets up the localization before running the 3rd eye code to ensure that the rest of the script works even if something went wrong when setting up the 3rd eye.
  • Removed Config.MaxDetectionDist as it was no longer needed (merged with interaction dist)
  • Optimized the debug thread by reducing unnecessary distance calculations
  • Removed unused ‘offset’ variable in main sitdown function
  • Replaced metadata.doingTaskGo with metadata.attAction (attempting action) to more accurately know if the player is attempting to sit/lay down
  • Added scenario offsets, this should allow for the usage of scenarios that need to be offset to fit alongside other scenarios for the same chair.
  • +Refactoring some code here and there

I’m almost certain it’s this script. I stopped the sit resource and it instantly stopped happening. I have no other keybinds for E since it’s a pretty common key to use for interactions.

I’ll give the update a try and see if that sorts out that issue. Just waiting on it to be available on keymaster :smiley:

Important Information
Both qtarget and qb-target have changed their raycast exports to no longer return the hit variable. Anyone using an updated version of either qtarget and qb-target needs to update to the latest version of the sit script to make them properly work when using Config.UseTargetingCoords.

I’ve pushed an update to the keymaster, it should be available in a couple of minutes.

I have purchased the script and am using the most up-to-date qbcore. I am not having luck getting anything to popup with leftalt. I have the folder installed into the resources folder and made sure to enable the folder in the server config. Have Installed it wrong (if so could you give a short explanation of how) or is it no longer working?

Hello! Sorry to hear that you haven’t had the best of luck getting the script to work. The script does not need or use qbcore (hence “standalone”). However, it does support the usage of qb-target. If you are using qb-target then make sure that Config.Target is set to ‘qb-target’ (with the quotation marks).

In general, I would advise you to go through the config file and see what settings you want to use and make sure things are set up properly. You also need to start the sit script after qb-target/qtarget.

Additionally, the owner of the resource (on the keymaster) needs to be set as the owner of the server you are running it on. If someone else is the owner of the server you could always transfer the ownership to them through the fivem keymaster.

If none of this helps then you could try to restart the script while you are in the server and see if it returns any errors when starting up (look both in the client and server console).

I hope that helps!

Could there be an option so that instead of the gta default notification coming out, one of your own comes out? Thank you!

Hello! There is already an option for that! If you set the Config.UseNativeNotifiactions to false, you could add your own notification export/function/event at line 43 in client.lua (just remove the mythic_notify one)

Cheers

Thanks for the quick response.
I do have the Config.Target set to ‘qb-target’ and the Sit file starts after [qb] folder which is where qb-target is located.
Currently when I do restart sit in the server nothing happens.
I’m not sure about the server owner setting. The cfx/keymaster account I purchased the script on is this one and I am the server owner. Not sure how to set myself as a server owner, I’m set as an admin.

Sorry to be asking for support on here, did not see another location to ask.
Thanks in advance!

1 Like