Jump to content
Sign in to follow this  
ffur2007slx2_5

How can I get a backpack classname which was dropped on the ground?

Recommended Posts

I've tried

hint format ["%1",nearestObjects [player, [], 50]];

while it returns quite a lot of info but no backpack classname that I dropped.

then

hint format ["%1",nearestObjects [player, ["dummyweapon"], 50]];

and

hint format ["%1",nearestObjects [player, ["weaponholder"], 50]];

still in vain.

At last

if ((backpack player) in (nearestObjects [player, [], 50])) then {hint "backpack name returned"}

nothing happened.

So I'm just figuring that there should be a way to check backpacks that were dropped on the gound but just can't get it out.

Share this post


Link to post
Share on other sites

- removed -

Edited by Tajin
obsolete

Share this post


Link to post
Share on other sites

I don't think that will work as the bag will be in a weaponholder

 hint str ((getBackpackCargo (nearestObjects [player, ["weaponholder"], 50] select 0) select 0) select 0) 

I had to dig into the weaponholder to find the bag, I'm sure there is a neater way to do this.

Share this post


Link to post
Share on other sites
I don't think that will work as the bag will be in a weaponholder

 hint str ((getBackpackCargo (nearestObjects [player, ["weaponholder"], 50] select 0) select 0) select 0) 

I had to dig into the weaponholder to find the bag, I'm sure there is a neater way to do this.

Great thanks it works!

Seems all Items, weapons or backpacks can be found in weapon holder.:p

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  

×