Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Bom nesse script, o player que pisar nessa area, todos do servidor ganham yellow skull, porém eu gostaria que apenas quem tivesse na area ganhasse o yellow skull.

 

function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition)

for posx = 1251,1259 do 
for posy = 716,724 do 
local pos = Position (posx, posy, 6) 
local creature = getTopCreature(pos).uid 
if isPlayer(creature) then 
player:setSkull(SKULL_YELLOW)
return true
end
end
end
end

Valeu Galera :)

  • Respostas 11
  • Visualizações 475
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition) local area = {{x=1251,y=716,z=6},{x=1259,y=724,z=6}} for x = area[1].x - 1, area[2].x + 1 do for y = area[1].

  • local from,to = {x=1251,y=716,z=6},{x=1259,y=724,z=6} function onThink(interval) for _, cid in pairs(Game.getPlayers()) do if isInRange(Player(cid):getPosition(), from, to) then Player(cid):setSkull(S

Postado

Não manjo dessa versão de TFS, mas tente assim:

Spoiler

function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition)

for posx = 1251,1259 do 
for posy = 716,724 do 
local pos = Position (posx, posy, 6) 
local creature = getTopCreature(pos).uid 
if isPlayer(creature) then 
creature:setSkull(SKULL_YELLOW)
return true
end
end
end
end

 

 

Postado
function onThink(player, interval, item, position, lastPosition, fromPosition, toPosition)
local area = {{x=1251,y=716,z=6},{x=1259,y=724,z=6}}
for x = area[1].x - 1, area[2].x + 1 do
for y = area[1].y - 1, area[2].y + 1 do
local pos = {x=x, y=y, z=area[1].z}
local m = getTopCreature(pos).uid
if m ~= 0 and isPlayer(m) then m:setSkull(SKULL_YELLOW) end
end
end
return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • Autor

@Vodkart    

Lua Script Error: [CreatureScript Interface]
data/creaturescripts/scripts/others/gh/ghskull.lua:onThink
data/creaturescripts/scripts/others/gh/ghskull.lua:7: attempt to index local 'm' (a number value)
stack traceback:
        [C]: in function '__index'
        data/creaturescripts/scripts/others/gh/ghskull.lua:7: in function <data/creaturescripts/scripts/others/gh/ghskull.lua:1>

 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo