Adiciona isso e testa aí:
-- se não funcionar, tenta trocar os parâmetros thing por cid, ex: ...getPlayerSlotItem(cid, 3).uid)...local ballsCount = 0 ballsCount = #getPokeballsInContainer(getPlayerSlotItem(thing, 3).uid) if getPlayerSlotItem(thing, 8).uid ~= 0 and isPokeball(getPlayerSlotItem(thing, 8).itemid) then ballsCount = ballsCount+1 end if getPlayerSlotItem(thing, 10).uid ~= 0 and isPokeball(getPlayerSlotItem(thing, 10).itemid) then ballsCount = ballsCount+1 end if ballsCount > 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendCancel(cid, "Guarde seus pokemons primeiro.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) end






info
Grupo: Barão
Registrado: 26/08/15
Posts: 239
Reputação: +41
Queria colocar uma verificação na minha script, caso o player tenha pokemons na bag desse um:
doTeleportThing(cid, fromPosition, true)
doPlayerSendCancel(cid, "Você não pode entrar com Pokemons na bag")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
Caso não tenha ele passa-se de boa ^ ^
Tentei umas formas aqui mão não consegui... Noob ainda ^ ^
Editado Novembro 30 por Stigal