Postado Janeiro 31, 2022 3 anos Gostaria que pra utilizar o comando o jogador devera ter uma storage, o codigo em questão é o: Agradeço desde já! local config = { --[vocation id] = { level, nova voc, looktype, efeito} [564] = { 50, 565, 1044, 72}, [430] = { 500, 479, 843, 252} } function onSay(cid, words, param, channel) doPlayerSay(cid, "transformar") local voc = config[getPlayerVocation(cid) ] local pos = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=1} if getCreatureLookDirection(cid) == SOUTH then pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255} elseif getCreatureLookDirection(cid) == NORTH then pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255} elseif getCreatureLookDirection(cid) == EAST then pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255} elseif getCreatureLookDirection(cid) == WEST then pos = {x=getCreaturePosition(cid).x+1, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z, stackpos=255} end if getPlayerStorageValue(cid, 16701) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você nao pode se transformar no evento Capture a Esfera!") else if voc then if getPlayerLevel(cid) >= voc[1] then doPlayerSetVocation(cid, voc[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você Transformou!") local outfit = {lookType = voc[3]} doCreatureChangeOutfit(cid, outfit) if voc[1] >= 500 then doSendMagicEffect(pos, voc[4]) else if voc[4] == 35 or voc[4] == 72 then doSendMagicEffect(pos, voc[4]) else doSendMagicEffect(getCreaturePosition(cid), voc[4]) end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " para transformar.") end else doPlayerSendCancel(cid, "Você não pode se transformar!") end end return true end testei esse do tópico abaixo mas não tive sucesso
Postado Fevereiro 1, 2022 3 anos para fazer com que seja necessário o jogador possuir uma storage pra utilizar o comando, basta adicionar uma verificação no código: if getPlayerStorageValue(cid, storageNecessaria) ~= valorDaStorage then return doPlayerSendCancel(cid, "Você não possui tal tal tal") end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.