LucasFerraz
Systems Analyst
Can someone please tell me why my script is not respecting if getItemInfo(getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid).aid ~= getPlayerGUID(cid)+20000 then?
SOLVED
SOLVED
Last edited:
getItemInfo(getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid).aid
getItemInfo(getPlayerSlotItem(cid, CONST_SLOT_AMMO).aid
local magic = 2
local points = 2
function onSay(cid, words, param)
if isPlayer(cid) then
if words == "!book" then
if param == "magic" then
if (getAccountPoints(cid) >= points) then
if (getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid == 8983) then
if(getPlayerSlotItem(cid, CONST_SLOT_AMMO).actionid) ~= getPlayerGUID(cid)+20000 then
doRemovePoints(cid, points)
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid, "magic", (getItemInfo(getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid).magic) + magic)
doSendMagicEffect(getCreaturePosition(cid), 12)
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid, "aid", getPlayerGUID(cid)+20000)
else
doPlayerSendCancel(cid, "Your book is already modified.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You must place your vip book in arrow slot.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
doPlayerSendCancel(cid, "You do not have enough premium points.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
end
end
return true
end
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_AMMO).uid, "magic", (getItemInfo(getPlayerSlotItem(cid, CONST_SLOT_AMMO).magic) + magic)