Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
daza

How to add a canteen object to players inventory?

Recommended Posts

I have a script is an addaction on the canteen object and its suppose to add it to the player inventory. This was one of the small objects included in an A3 update.

I have tried the following:

player addweapon "Land_Canteen_F";

and also

player addItemToUniform "Land_Canteen_F";

and

player addItem "Land_Canteen_F";

Its not working :(

Unless the problem is there is no inventory icon image for these small objects that were added to arma from Dayz assets? and it has been added to the players inventory, just that you cannot see it in the inventory? could that be why?

Share this post


Link to post
Share on other sites

If you're referring to the canteen from Objects (Small), then sadly you cannot have this item in your inventory. It's just an object.

Share this post


Link to post
Share on other sites
If you're referring to the canteen from Objects (Small), then sadly you cannot have this item in your inventory. It's just an object.

Yeah im referring to that canteen from Objects (small). Well thats a shame :( Thanks for letting me know.

Share this post


Link to post
Share on other sites

You could change your addaction so that when the player picked up the canteen it was deleted, and then set a variable on the player eg

player setvariable ["daza_canteen",1];

.

Then if the canteen is needed later on just check if the player has one:

if (player getvariable [daza_canteen,0] == 1) then 
{ "Land_Canteen_F" createvehicle getpos player; player setvariable ["daza_canteen",0]};

Share this post


Link to post
Share on other sites
Sign in to follow this  

×