Gostaria de modificar esse script para o tfs.12
https://www.youtube.com/watch?v=V_gFMDoNMnw&hd=1
Gostaria de modificar esse script para o tfs.12
https://www.youtube.com/watch?v=V_gFMDoNMnw&hd=1
Para te ajudarmos, poste o código de forma organizada e dentro de CODES ou Spoiler para ficar mais fácil de visualizar e te ajudar, pois desse jeito está difícil visualizar.
Em 10/07/2021 em 02:28, Yan Oliveira disse:Para te ajudarmos, poste o código de forma organizada e dentro de CODES ou Spoiler para ficar mais fácil de visualizar e te ajudar, pois desse jeito está difícil visualizar.
Tópico editado para melhor entendimento
https://www.youtube.com/watch?v=V_gFMDoNMnw&hd=1
Substitua o código por este:
local message_color = 25 -- COR DA MENSAGEM function getSpectators(fromPos, toPos) -- Function made by Vodkart local players = {} for _, pid in ipairs(getSpectators()) do if isInRange(getSpectators(pid), fromPos, toPos) then table.insert(players, pid) end end return players end -- Do not remove the credits ---- [MOVEEVENT] Limite de player por sala ---- Developed by Rigby ---- Especially for the Xtibia.com -- function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) local config = { [2233] = {area = getPlayersInArea({x = 696, y = 971, z = 11}, {x = 821, y = 1063, z = 12}), amountOfPlayers = 4, teleport = Position(721, 1003, 11)}, [2234] = {area = getPlayersInArea({x = 725, y = 1069, z = 11}, {x = 895, y = 1126, z = 12}), amountOfPlayers = 4, teleport = Position(685, 991, 11)}, [2235] = {area = getPlayersInArea({x = 448, y = 192, z = 11}, {x = 523, y = 230, z = 12}), amountOfPlayers = 4, teleport = Position(464, 202, 11)}, } if config[item.actionid] then if #config[item.actionid].area < config[item.actionid].amountOfPlayers then cid:teleportTo(config[item.actionid].teleport) cid:sendTextMessage(message_color, "Welcome") else cid:sendTextMessage(message_color, "The room already reached its limit " .. config[item.actionid].amountOfPlayers .. " player 's wait someone out.") cid:teleportTo(fromPosition) end end return true end
Também criei uma variável para armazenar a cor do texto para ficar mais fácil caso queira mudar.
Teste e me informe se der algum problema.
Em 12/07/2021 em 22:18, Yan Oliveira disse:Substitua o código por este:
local message_color = 25 -- COR DA MENSAGEM function getSpectators(fromPos, toPos) -- Function made by Vodkart local players = {} for _, pid in ipairs(getSpectators()) do if isInRange(getSpectators(pid), fromPos, toPos) then table.insert(players, pid) end end return players end -- Do not remove the credits ---- [MOVEEVENT] Limite de player por sala ---- Developed by Rigby ---- Especially for the Xtibia.com -- function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) local config = { [2233] = {area = getPlayersInArea({x = 696, y = 971, z = 11}, {x = 821, y = 1063, z = 12}), amountOfPlayers = 4, teleport = Position(721, 1003, 11)}, [2234] = {area = getPlayersInArea({x = 725, y = 1069, z = 11}, {x = 895, y = 1126, z = 12}), amountOfPlayers = 4, teleport = Position(685, 991, 11)}, [2235] = {area = getPlayersInArea({x = 448, y = 192, z = 11}, {x = 523, y = 230, z = 12}), amountOfPlayers = 4, teleport = Position(464, 202, 11)}, } if config[item.actionid] then if #config[item.actionid].area < config[item.actionid].amountOfPlayers then cid:teleportTo(config[item.actionid].teleport) cid:sendTextMessage(message_color, "Welcome") else cid:sendTextMessage(message_color, "The room already reached its limit " .. config[item.actionid].amountOfPlayers .. " player 's wait someone out.") cid:teleportTo(fromPosition) end end return true end
Também criei uma variável para armazenar a cor do texto para ficar mais fácil caso queira mudar.
Teste e me informe se der algum problema.
Nao aconteceu nd porem nao deu erro nem um
-----EEDIT------
ERRO MEU troquei a tag no xml pegou certinho aqui obg ^^
https://www.youtube.com/watch?v=V_gFMDoNMnw&hd=1
7 horas atrás, piradeco disse:Nao aconteceu nd porem nao deu erro nem um
-----EEDIT------
ERRO MEU troquei a tag no xml pegou certinho aqui obg ^^
Que bom que deu certo!