Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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!
Im trying to create "special items" and like I want that a certain ammo can only be used with one weapon and vice-versa. How can I make such thing?
TFS 0.3.6
You can do what Xikini posted so you won't be able add it in the arrow/hand slot.
Add the arrow to movements.xml with slot ammo and check in the Lua script for slot item of both hands or add the bow with slot hand and check for slot item in the ammo slot.
Code:
function onEquip(cid, item, slot)
if .. then
return true
end
return false
end
For arrow:
Code:
if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == x or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == x then
Bow:
Code:
if getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid == x then
Instead of x the itemid.
You can also do it as a weapon script, then you can still add the ammo in the slot but simply not shoot with it when you don't use the right bow.