Robustcolor 30 Posted July 8, 2021 Hi, does not this command work in a dedicated server on players? initPlayerLocal.sqf backpackContainer player lockInventory true; I'm checking if the inventory is locked with lockedInventory backpackContainer player and it says it's true but it still accessible from a third party. Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 8, 2021 Looking at the top pf this biki page https://community.bistudio.com/wiki/lockInventory shows you LE which means Local Effect. This means it locks the backpack for the client where it was executed only. You have to remotely execute it on all clients. https://community.bistudio.com/wiki/remoteExec Edit: This should work but I cant test it: [ backpackContainer player, true ] remoteExec [ "lockInventory", -2, true]; 1 Share this post Link to post Share on other sites
Robustcolor 30 Posted July 8, 2021 Thanks @sarogahtyp I have to execute the command again when a player respawn else the backpackContainer is not locked. InitPlayerLocal.sqf [backpackContainer player, true] remoteExec ["lockInventory", -2, true]; onPlayerRespawn.sqf [backpackContainer player, true] remoteExec ["lockInventory", -2, true]; I have a question about JIP queue. The above code won't fill up the jip queue but in other context it would. How to prevent stacking in jip queue? -2, true makes a new unique jip id everytime it's executing the command filling up the queue. Maybe this would work? [backpackContainer player, true] remoteExec ["lockInventory", -2, name player]; should make the player name the unique jip id, correct? 1 Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 8, 2021 1 hour ago, Robustcolor said: Maybe this would work? [backpackContainer player, true] remoteExec ["lockInventory", -2, name player]; should make the player name the unique jip id, correct? Looks like a smart solution for me. Edit: If you have a server with hundreds of different players then you can think about adding an event handler on server which deletes the jip entry if the player disconnects and also removes the event handler for this specific player. But i cant fiddle that out on mobile 1 Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 8, 2021 post edited... 1 Share this post Link to post Share on other sites
Robustcolor 30 Posted July 9, 2021 12 hours ago, sarogahtyp said: If you have a server with hundreds of different players then you can think about adding an event handler on server which deletes the jip entry if the player disconnects and also removes the event handler for this specific player. But i cant fiddle that out on mobile Hm, how do i check if a player has something in jip queue then delete it upon disconnection? addMissionEventHandler ["HandleDisconnect",{ remoteExec ["", "name _this select 0"]; }]; 1 Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 9, 2021 20 minutes ago, Robustcolor said: addMissionEventHandler ["HandleDisconnect",{ remoteExec ["", "name _this select 0"]; }]; looks good for me. Should work. No need to detect if there is something in the queue. 1 Share this post Link to post Share on other sites