Ir para conteúdo

Featured Replies

Postado

Como faço para adicionar novas areas nesse movement?

 

local eventArea = {from = {x=96, y=186, z=7}, to = {x=102, y=192, z=7}} -- area do evento...
function onStepIn(cid, item, position, fromPosition)
	for _, pid in pairs(getPlayersOnline()) do
		if(cid ~= pid and getPlayerIp(cid) == getPlayerIp(pid) and isInRange(getThingPos(pid), eventArea.from, eventArea.to)) then
			doTeleportThing(cid, fromPosition, false)
			doPlayerSendTextMessage(cid, 25, "[ANTI-MC] Não é permitido entrar com 2 chars no mesmo IP!")
			return true
		end
	end
	return true
end

 

Exemplo:

areas = {
[1] = {{x = 596, y = 648, z = 15}, {x = 644, y = 687, z = 15}}, -- Area 1
[2] = {{x = 690, y = 372, z = 7}, {x = 732, y = 409, z = 7}},  -- Area 2
[3] = {{x = 1549, y = 41, z = 7}, {x = 1612, y = 91, z = 7}},  -- Area 3
[4] = {{x = 460, y = 14, z = 15}, {x = 517, y = 71, z = 15}},  -- Area 4
[5] = {{x = 34, y = 556, z = 7}, {x = 56, y = 580, z = 7}},     -- Area 5
[6] = {{x = 1628, y = 49, z = 7}, {x = 1731, y = 124, z = 7}},  -- Area 6
[7] = {{x = 641, y = 717, z = 9}, {x = 676, y = 742, z = 9}},  -- Area 7
[8] = {{x = 636, y = 656, z = 8}, {x = 701, y = 765, z = 8}}  -- Area 8

 

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.8k

Informação Importante

Confirmação de Termo