Hello there to Everyone!
I was searching , on how to disable the option for opening the backpacks of others.
So for anyone interested , this is the code:
The best solution so far is here
Grumpy Old Man :
Thank you for the quick replies Grumpy Old Man and HazJ!
After reading your posts I went to first test HazJ's suggestion in the existing mission I'm creating and the result was (as far as I remember anymore) the same: I still could access the AI's backpacks and manipulate its inventory while the line This is not the backpack you're looking for was still being output in the system chat.
After that I went on to disable all the modifications and created the simplest mission with an editor placed AI group and one slot for myself to once again test GOM's script. The result from that test was that the script works as intended. Then I started adding modifications one by one and finally the "mission framework" I'm using to create missions. Eventually I got the hang of the fact that the mission framework includes a InventoryOpened EH that gets executed slightly later than the GOM's one placed (in this case) in initPlayerLocal.sqf. Solution in my case was to remove the framework's EH after which GOM's version started working as it should.