i using one function to return one value to name of a item equiped in hands
but dosent work i dont know why
help me plx
rep++
but dosent work i dont know why
PHP:
function getSuperAttack(cid)
local weapon = {3963, 3964, 3965}
local item = getPlayerItemById(cid, TRUE, weapon)
local dir = getPlayerSlotItem(cid, CONST_SLOT_LEFT)
local esq = getPlayerSlotItem(cid, CONST_SLOT_RIGHT)
if (isInArray(item.uid, dir.itemid)) or (isInArray(item.uid, esq.itemid)) then
local name = getItemName(item.uid):match('(.-) health')
local Health = getItemName(item.uid):match(''..name..' health (.-)/')
local maxHealth = getItemName(item.uid):match(''..name..' health '..Health..'/(.-) weapon')
local nameWeapon = getItemName(item.uid):match(''..name..' health '..Health..'/'..maxHealth..' weapon (.-)/')
return getItemName(item.uid):match(''..name..' health '..Health..'/'..maxHealth..' weapon '..nameWeapon..'/(.-) armor')
end
end
help me plx
rep++