Running code by using an item #121
Replies: 3 comments 1 reply
-
|
There's a few ways to do something like that:
Once you have the
set_item_stack_size(item, get_item_stack_size() - 1)Note: In case of item stacks, decreasing the stack size to 0 will not remove the item automatically. You'll probably need to call |
Beta Was this translation helpful? Give feedback.
-
|
One more thing: |
Beta Was this translation helpful? Give feedback.
-
|
v2.3.6 is out. Setting the item stack size to 0 via set_item_stack_size will now automatically remove it from the inventory and queue it for deletion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to make a medkit, so I want code to run that increases the players health when they activate the item.
Is there functionality for this, if so, how would i do this?
Beta Was this translation helpful? Give feedback.
All reactions