• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to remove item with action XXX?

Meferot

New Member
Joined
Jan 28, 2008
Messages
57
Reaction score
1
Hello guys ;)
I have very difficult problem.
I'll do script which from one item (different action) add XX addons.
Example:
Item id - 10503, action - 1015 adding first nobleman addon,
Item id - 10503, action - 1016 adding first warrior addon.

I did most of script but now I have one problem - how to remove item with action XXXX? Because if I have two item 10503 with different action in backpack system remove first item in bp, even if I use second item in bp.

Example:
Used item 10503, action 1015 (second position in bp), removed: item 10503, action 1016 (first position in bp).

I needing function like: doRemovePlayerActionItem.
Or mayby remove used.item.
 
Last edited:
in actions you have
Code:
function onUse(cid, item, frompos, item2, topos)
so you should use doRemoveThing(item.uid)or sth like that(you can use ant removing function you want, just put item.uid as parameter
 
Just replace your deleting function in script with doRemoveThing(item.uid)
item is variable containing all info about used item(for actions) and .uid makes deleting function know which item to delete(well, at least I understand it this way, but works like that so I guess I'm right ;d)

If you will have any more problems you can pm(or post here) your script and I can edit it
 
Back
Top