Nesse caso aqui ele só vai poder usar se estiver dentro de PZ e sem batle.
function onUse(cid, item, frompos, item2, topos)
pos = {x=549, y=14, z=7}
if item.itemid == 8985 then
if isPlayerPzLocked(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você não pode usar estando PZ Locked.")
else
if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.")
else
doPlayerSendCancel(cid,"Abra o bau para se tornar vip!")
doTeleportThing(cid,pos)
doRemoveItem(item.uid,1)
else
doPlayerSendCancel(cid,"Fail !")
end
end
end
return 1
end
@Edit
Esqueci do outro ;s
function onUse(cid, item, frompos, item2, topos)
pos = {x=528, y=14, z=7}
if item.itemid == 8982 then
if isPlayerPzLocked(cid) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você não pode usar estando PZ Locked.")
else
if (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Você precisa está em área protegida para utilizar este comando.")
else
doPlayerSendCancel(cid,"Abra o bau para se tornar vip!")
doTeleportThing(cid,pos)
doRemoveItem(item.uid,1)
else
doPlayerSendCancel(cid,"Fail !")
end
end
end
return 1
end








info
Grupo: Artesão
Registrado: 24/10/11
Posts: 142
Reputação: +4
Gênero: Feminino
Tenho 2 itens no meu servidor que gostaria que adicionassem nesses dois scripts um bloqueio pra só poderem usar o item se estiverem de pz e sem battle.
os scripts são esses :
function onUse(cid, item, frompos, item2, topos) pos = {x=549, y=14, z=7} if item.itemid == 8985 then doPlayerSendCancel(cid,"Abra o bau para se tornar vip!") doTeleportThing(cid,pos) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Fail !") end return 1 ende esse :
function onUse(cid, item, frompos, item2, topos) pos = {x=528, y=14, z=7} if item.itemid == 8982 then doPlayerSendCancel(cid,"Abra o bau para se tornar vip!") doTeleportThing(cid,pos) doRemoveItem(item.uid,1) else doPlayerSendCancel(cid,"Fail !") end return 1 endAgradeço deis de já.