Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
OTBR-Global
Base:
Not sure what you mean with base?
Qual é a sua pergunta?
Everything works fine, teleport opens, people get inside and they get teleported to the waiting room. When the event should start im getting this error. And people in the waiting room do not get teleported.
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
Spoiler
function startGame(rounds)if rounds ==0thenif#CACHE_GAMEPLAYERS < SnowBall_Configurations.Event_MinPlayers thenfor _, players in ipairs(CACHE_GAMEPLAYERS)doPlayer(players):teleportTo(Player(players):getTown():getTemplePosition())end
broadcastMessage("[Snowball Event]: Not enough players to start Last man Standing event! Minimum: "..SnowBall_Configurations.Event_MinPlayers.." players.")elsefor _, players in ipairs(CACHE_GAMEPLAYERS)doPlayer(players):setStorageValue(10109,0)Player(players):setStorageValue(10108,SnowBall_Configurations.Ammo_Configurations.Ammo_Start)Player(players):teleportTo(CACHE_GAMEAREAPOSITIONS[math.random(1,#CACHE_GAMEAREAPOSITIONS)])end
broadcastMessage("[Snowball Event]: event portal closed and event started!.")
addEvent(Event_endGame,SnowBall_Configurations.Event_Duration*60*1000)endItem(getTileItemById(SnowBall_Configurations.Area_Configurations.Position_EventTeleport,1387).uid):remove(1)Item(getTileItemById(SnowBall_Configurations.Area_Configurations.Position_ExitWaitRoom,1387).uid):remove(1)returntrueendif#CACHE_GAMEPLAYERS < SnowBall_Configurations.Event_MinPlayers then
broadcastMessage("[Snowball Event]: will be closed in ".. rounds .." minutes and "..SnowBall_Configurations.Event_MinPlayers-#CACHE_GAMEPLAYERS .." players for start.")else
broadcastMessage("[Snowball Event]: was opened and will be closed in ".. rounds .." minutes.")endreturn addEvent(startGame,60*1000, rounds -1)endfunction onTime(interval)ifnotSnowBall_Configurations.Event_Days[os.date("%w")+1]thenreturntrueend
CACHE_GAMEPLAYERS ={}localEventTeleport=Game.createItem(1387,1,SnowBall_Configurations.Area_Configurations.Position_EventTeleport)EventTeleport:setActionId(10101)localExitWaitRoom=Game.createItem(1387,1,SnowBall_Configurations.Area_Configurations.Position_ExitWaitRoom)ExitWaitRoom:setActionId(10102)
broadcastMessage("[Snowball Event]: was opened, entrance through Temple of Thais!")
addEvent(startGame,60*1000,SnowBall_Configurations.Event_WaitGame)returntrueendfunction startGame(rounds)if rounds ==0thenif#CACHE_GAMEPLAYERS < SnowBall_Configurations.Event_MinPlayers thenfor _, players in ipairs(CACHE_GAMEPLAYERS)doPlayer(players):teleportTo(Player(players):getTown():getTemplePosition())end
broadcastMessage("[Snowball Event]: Not enough players to start Last man Standing event! Minimum: "..SnowBall_Configurations.Event_MinPlayers.." players.")elsefor _, players in ipairs(CACHE_GAMEPLAYERS)doPlayer(players):setStorageValue(10109,0)Player(players):setStorageValue(10108,SnowBall_Configurations.Ammo_Configurations.Ammo_Start)Player(players):teleportTo(CACHE_GAMEAREAPOSITIONS[math.random(1,#CACHE_GAMEAREAPOSITIONS)])end
broadcastMessage("[Snowball Event]: event portal closed and event started!.")
addEvent(Event_endGame,SnowBall_Configurations.Event_Duration*60*1000)endItem(getTileItemById(SnowBall_Configurations.Area_Configurations.Position_EventTeleport,1387).uid):remove(1)Item(getTileItemById(SnowBall_Configurations.Area_Configurations.Position_ExitWaitRoom,1387).uid):remove(1)returntrueendif#CACHE_GAMEPLAYERS < SnowBall_Configurations.Event_MinPlayers then
broadcastMessage("[Snowball Event]: will be closed in ".. rounds .." minutes and "..SnowBall_Configurations.Event_MinPlayers-#CACHE_GAMEPLAYERS .." players for start.")else
broadcastMessage("[Snowball Event]: was opened and will be closed in ".. rounds .." minutes.")endreturn addEvent(startGame,60*1000, rounds -1)endfunction onTime(interval)ifnotSnowBall_Configurations.Event_Days[os.date("%w")+1]thenreturntrueend
CACHE_GAMEPLAYERS ={}localEventTeleport=Game.createItem(1387,1,SnowBall_Configurations.Area_Configurations.Position_EventTeleport)EventTeleport:setActionId(10101)localExitWaitRoom=Game.createItem(1387,1,SnowBall_Configurations.Area_Configurations.Position_ExitWaitRoom)ExitWaitRoom:setActionId(10102)
broadcastMessage("[Snowball Event]: was opened, entrance through Temple of Thais!")
addEvent(startGame,60*1000,SnowBall_Configurations.Event_WaitGame)returntrueend
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
Antes de fazer a sua pergunta, tenha certeza de ter lido as regras da seção e o guia abaixo:
https://forums.otserv.com.br/index.php?/forums/topic/168583-regras-da-seção/
https://forums.otserv.com.br/index.php?/forums/topic/165121-como-fazer-uma-pergunta-ou-o-grande-guia-do-usuário-com-dúvidas/
Descreva em algumas palavras a base utilizada. (Nome do servidor / Nome do cliente / Nome do website / etc.).
OTBR-Global
Base:
Not sure what you mean with base?
Qual é a sua pergunta?
Everything works fine, teleport opens, people get inside and they get teleported to the waiting room. When the event should start im getting this error. And people in the waiting room do not get teleported.
Você tem o código disponível? Se tiver poste-o na caixa de código que está dentro do spoiler abaixo:
Você tem alguma imagem que possa auxiliar no problema? Se sim, anexe-a dentro do spoiler abaixo:
Compartilhar este post
Link para o post
Compartilhar em outros sites