Postado Abril 21, 2015 10 anos 2º linha local newColor = {lookBody = xxx, lookHead = xxx, lookLegs = xxx, lookFeet = xxx} --Configure aqui a cor da roupa dos membros da guild. local pos = {x = 1000, y = 1000, z = 7} function onUse(cid) if getPlayerGuildId(cid) > 0 then if getPlayerGuildRank(cid) == "leader" then for _, pid in pairs(getPlayersOnline()) do if getPlayerGuildId(pid) == getPlayerGuildId(cid) and pid ~= cid then newColor.lookType = getCreatureOutfit(pid).lookType doPlayerSendTextMessage(pid, 27, "Your guild leader ("..getCreatureName(cid)..") pulled you.") doTeleportThing(pid, pos) doSetCreatureOutfit(pid, newColor, -1) end end else doPlayerSendCancel(cid, "You aren't the guild leader.") end else doPlayerSendCancel(cid, "You don't have a guild.") end return true end
Postado Abril 23, 2015 10 anos Autor 2º linha local newColor = {lookBody = xxx, lookHead = xxx, lookLegs = xxx, lookFeet = xxx} --Configure aqui a cor da roupa dos membros da guild. local pos = {x = 1000, y = 1000, z = 7} function onUse(cid) if getPlayerGuildId(cid) > 0 then if getPlayerGuildRank(cid) == "leader" then for _, pid in pairs(getPlayersOnline()) do if getPlayerGuildId(pid) == getPlayerGuildId(cid) and pid ~= cid then newColor.lookType = getCreatureOutfit(pid).lookType doPlayerSendTextMessage(pid, 27, "Your guild leader ("..getCreatureName(cid)..") pulled you.") doTeleportThing(pid, pos) doSetCreatureOutfit(pid, newColor, -1) end end else doPlayerSendCancel(cid, "You aren't the guild leader.") end else doPlayerSendCancel(cid, "You don't have a guild.") end return true end Não funcionou, tipo quando eu não sou dono de guild NÂO aparece a msg "You don't have a guild" e quando eu sou lider de guild aparece a msg "You aren't the guild leader" porem não teleporta nem nada. bump
Postado Abril 24, 2015 10 anos A mensagem "You don't have a guild." vai aparecer quando você não estiver em uma guilda. Abaixo de: function onUse(cid) coloque: print(getPlayerGuildRank(cid)) E informe o que for imprimido no console, por favor. não respondo pms solicitando suporte em programação/scripting
Postado Abril 26, 2015 10 anos Autor Ao dar /reload actions aparece isso. Warning - Event::checkScript] Can not load script: scripts/warzone/waramarelo.lua data/actions/scripts/warzone/waramarelo.lua:21: expected near 'end' E quanto eu clico na alavanca aparece isso Lua Script Error: [Action Interface] data/actions/scripts/warzone/warlaranja.lua:onUse data/actions/scripts/warzone/warlaranja.lua:4: attempt to compare number with boolean stack traceback: [C]: in function '__lt' data/actions/scripts/warzone/warlaranja.lua:4: in function Actions usada local newColor = {lookBody = 79, lookHead = 79, lookLegs = 79, lookFeet = 79} --Configure aqui a cor da roupa dos membros da guild. local pos = {x = 31427, y = 32417, z = 11} print(getPlayerGuildRank(cid)) if getPlayerGuildId(cid) > 0 then if getPlayerGuildRank(cid) == "leader" then for _, pid in pairs(getPlayersOnline()) do if getPlayerGuildId(pid) == getPlayerGuildId(cid) and pid ~= cid then newColor.lookType = getCreatureOutfit(pid).lookType doPlayerSendTextMessage(pid, 27, "Your guild leader ("..getCreatureName(cid)..") pulled you.") doTeleportThing(pid, pos) doSetCreatureOutfit(pid, newColor, -1) end end else doPlayerSendCancel(cid, "You aren't the guild leader.") end else doPlayerSendCancel(cid, "You don't have a guild.") end return true end Editado Abril 26, 2015 10 anos por Lykkan (veja o histórico de edições)
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.