Jump to content
Sign in to follow this  
topden

need help

Recommended Posts

tell me how to make a player laying a weapon on the ground (box, car) can no longer pick it up?

Share this post


Link to post
Share on other sites

I guess you can Dmg the weapon on the ground and it will remove the interaction:

{_x setDamage 1} forEach (nearestObjects [player,["WeaponHolderSimulated"],5]);

Taken from this Tread:

 

Share this post


Link to post
Share on other sites

@topden, here seems to be a suitable example for weapon holder removal.
To block getting weapons, you need to handle InventoryClosed event, where, for example, to assign the player's GUID to the weapon holder, and InventoryClosed event, where to check this GUID and, if it is equal to the player's GUID, close the inventory. Plus, you need to add using inGameUISetEventHandler command Rearm event handler, where also check the GUID.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×