Because the function "getItemName()" was changed to "getItemNameById()"
I got this message when i open the server :S "****" i wrote that because i get many and diffrent npc :S
Please help
exiva "beta03
How do i check if a player wear a Weapon? like I mean how do I know if a player wear a wand? is there a function to check please help
getPlayerSlotItem(cid, slot)
Info
This function will check what item player have actually in slot.
Skillid can be:
1 = helmet
2 = necklace slot (amulet of loss etc.)
3 = backpack, bag
4 = armor
5 = left hand (its really hand placed >> (right page on screen))
6 = right hand (its really hand placed << (left page on screen))
7 = legs
8 = boots
9 = ring slot
10 = ammo slot (arrows etc.)
I got this message when i open the server :S "****" i wrote that because i get many and diffrent npc :S
[18/01/2009 02:11:56] luaGetItemName(). Item not found
[18/01/2009 02:11:56] Lua Script Error: [Npc interface]
[18/01/2009 02:11:56] data/npc/scripts/****.lua
Please help
okey thanks i will test itOriginally Posted by kleksu View Post
Remove the unique? Not sure though.
How do i check if a player wear a Weapon? like I mean how do I know if a player wear a wand? is there a function to check please help
local lefthand = getPlayerSlotItem(cid,5) --(its really hand placed >> (right page on screen))
local righthand = getPlayerSlotItem(cid,6) --(its really hand placed << (left page on screen))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if lefthand.itemid == 2400 or righthand.itemid == 2400 then
--(your script here)
end
return true
end