Jump to content
Sign in to follow this  
tyler4171

Check if a player has a magazine and remove it?

Recommended Posts

Im trying to make a thirst script but would like to check if the player has a an ACE_IV in order to do it. Also I would like for it to remove it after its been used. I already have the script to kill the player after a value has been reached, i just need to know how to check if the player has an IV and how to remove after its been used. thanks!

EDIT: Just found out how to check for the magazine bu still dont know how to remove it :(

Edited by tyler4171

Share this post


Link to post
Share on other sites

Sadly that doesnt seem to remove the IV pack :(

Share this post


Link to post
Share on other sites

Is it a magazine or a weapon? Try testing if removemagazines removes it, or if removeallweapons does. Check to biki to make sure those commands are correct. I know removeallweapons this; works, not sure about removemagazines.

Share this post


Link to post
Share on other sites

Tried removeMagazines and no go. It still wont remove it. Even though the command is to add an IV pack is playername addMagazine "ACE_IV"

Share this post


Link to post
Share on other sites

It might not be helpful, but try getting the array of magazines using the magazines command. See what's in there.

Share this post


Link to post
Share on other sites

This will remove all Hand Grenades (West) from the player..... don't know anything about ACE but should do the same for ACE_IV if it is in fact a magazine.

_mags = magazines player;

while {"HandGrenade_West" in _mags} do {
_mags = _mags - ["HandGrenade_West"];
sleep 0.01;
};

Edited by twirly

Share this post


Link to post
Share on other sites
Please post how or where.

"ACE_IV" in magazines player

Assuming that "ACE_IV" is the valid classname for that.

To remove them it's just:

player removeMagazines "ACE_IV";

to remove just one it's:

player removeMagazine "ACE_IV";

IV Bag isn't currently used in ACE Wounding though I don't think.

Edited by kylania

Share this post


Link to post
Share on other sites

IV Bag isn't currently used in ACE Wounding though I don't think.

Thanks, and I think hes using it alongside add action maybe to simulate drinking water, as an IV is as close as you can really get.

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  

×