Muvuka 1 Postado Abril 29, 2024 Share Postado Abril 29, 2024 -=[TFS]=- 0.3.6 8.60 - ME AJUDA POR FAVOR QUANDO PLAYER LOGA NO TEMPLO DA DEBUG POR QUE TEM OURO CHAR NA MESMA POSIÇÃO Link para o comentário https://xtibia.com/forum/topic/259556-tfs-036-860-me-ajuda-por-favor-quando-player-loga-no-templo-da-debug-por-que-tem-ouro-char-na-mesma-posi%C3%A7%C3%A3o/ Compartilhar em outros sites More sharing options...
1 El Rusher 43 Postado Abril 30, 2024 Share Postado Abril 30, 2024 acho que isso resolve: function onLogin(player) local spawnPosition = Position(100, 50, 7) -- Coordenadas do spawn local occupied = false -- Verifica se existe algum jogador na posição de spawn for _, otherPlayer in ipairs(Game.getPlayers()) do if otherPlayer:getPosition() == spawnPosition then occupied = true break end end -- Se a posição de spawn estiver ocupada, move o jogador para uma posição próxima if occupied then local newPosition = spawnPosition:getRandomTile(1) -- obtém uma posição aleatória adjacente player:teleportTo(newPosition) else player:teleportTo(spawnPosition) end end -- Registra o evento de login para chamar a função onLogin function onLoginEvent(player) onLogin(player) end Muvuka reagiu a isso 1 Link para o comentário https://xtibia.com/forum/topic/259556-tfs-036-860-me-ajuda-por-favor-quando-player-loga-no-templo-da-debug-por-que-tem-ouro-char-na-mesma-posi%C3%A7%C3%A3o/#findComment-1774868 Compartilhar em outros sites More sharing options...
Pergunta
Muvuka 1
-=[TFS]=- 0.3.6 8.60 - ME AJUDA POR FAVOR QUANDO PLAYER LOGA NO TEMPLO DA DEBUG POR QUE TEM OURO CHAR NA MESMA POSIÇÃO
Link para o comentário
https://xtibia.com/forum/topic/259556-tfs-036-860-me-ajuda-por-favor-quando-player-loga-no-templo-da-debug-por-que-tem-ouro-char-na-mesma-posi%C3%A7%C3%A3o/Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados