[BUG?] You can access all categories by talking through a wall or from distance to an NPCSolved

Hi there,

i'm currently facing a problem with GUI Shop.
We are using different NPCs (HumanNPC) as Roleplay-Element and each of them have an own limited category. All working fine as long as you are not talking through a wall or from distance to them.

If you do, you can access and buy Items from all categories even the POLICE and ADMIN Category which is ... not wanted :D

You can find a short video about the bug here: > Youtube <

I have to deactivate all NPCs due to this problem at our RP Server. May you have an Idea to fix this?

Thanks in advance,
Bruunooh

Please update to 2.0.8 under the master branch.

Inside the config, you will find new options.

Please adjust the "NPC Distance Check" to smaller than the default provided setting which is currently set to 2.5f 

 

I recommend having the NPC closer to the wall at which they will be trying to interact with them.

So the window for example. And reduce it until you find that sweet spot where they can't access him outside. 

 



Merged post

Also, human NPC may have its own distance check setting as well for its E use in which case my setting will only work for the /shop command method/auto-open setting. 

ocuE1cfj99e4vYl.png khan

Please update to 2.0.8 under the master branch.

Inside the config, you will find new options.

Please adjust the "NPC Distance Check" to smaller than the default provided setting which is currently set to 2.5f 

 

I recommend having the NPC closer to the wall at which they will be trying to interact with them.

So the window for example. And reduce it until you find that sweet spot where they can't access him outside. 

 



Merged post

Also, human NPC may have its own distance check setting as well for its E use in which case my setting will only work for the /shop command method/auto-open setting. 

Hi Khan,

thanks for your quick reply. I have deleted all files for HumanNPC and GUI Shop and started from scratch. Unfortunatly, the problem still persists. If i use your method (auto-open) it works but if the player opens the shop before he is in range for auto-open, you can still access all categories.

I have changed every range / distance option for HumanNPC, nothing affects the range of using E on an NPC.

Do have any idea?

Geetings,
Bruunooh

Oooooo wait.

If all your shops are only NPC and you have Zero global shops setup change in the config

"Set Default Global Shop to open": "Commands",

This ^ to 

"Set Default Global Shop to open": "",

To this ^ That is how you disable global shops now entirely.

Save and reload! should fix it

N0grMHqB2OHXli2.jpg Bruunooh

If i use your method (auto-open) it works but if the player opens the shop before he is in range for auto-open, you can still access all categories.

I have changed every range / distance option for HumanNPC, nothing affects the range of using E on an NPC.

Do have any idea?

Please add me on discord Khan#8615

I think I may see the bug in the code and might have a possible update that could resolve this issue with NPCs.

That I would like to send you in private msg to try. 

If this doesn't fix it I will need to re-think what to do with NPC's altogether to try and stop it.

This bug started after rust did the changes with NPCs a few updates back from what I see here. 

I am sorry I didn't understand the issue fully at first. But I do now 



Merged post

Okie, so the issue is a bug between GUIShop and HumanNPC both having different distance checks hardcoded. I have reached out to the maintainer for HumanNPC and have advised him of the issue and how to resolve it for us. Now we just gotta wait and hope an update gets released. 
Uf2UFYg4h5M8fWJ.jpg Bruunooh

Hi Khan,

thanks for your quick reply. I have deleted all files for HumanNPC and GUI Shop and started from scratch. Unfortunatly, the problem still persists. If i use your method (auto-open) it works but if the player opens the shop before he is in range for auto-open, you can still access all categories.

I have changed every range / distance option for HumanNPC, nothing affects the range of using E on an NPC.

Do have any idea?

Geetings,
Bruunooh

Hello, please try the latest HumanNPC update and the latest GUIShop update. Make sure to set both config options at about 2.6 to start with and see how it works for you.



Merged post

In all my testing I highly believe this bug is resolved please notify me if it's fixed for you with the latest HumanNPC and GUIShop versions 

Testing out this weekend.

Merged post

After wiping the configs and updating to the newest release it works flawless. Thank you a lot!!!

Locked automatically