Pifafa
Member
- Joined
- Nov 9, 2010
- Messages
- 48
- Reaction score
- 5
Hello everyone, I would like to modify this script so that you can enter up to 3 people with the same IP.
~~Br~~
Olá todos, gostaria de fazer uma modoficação nesse script para que pode-se entra até 3 pessoas com o mesmo IP.
~~Br~~
Olá todos, gostaria de fazer uma modoficação nesse script para que pode-se entra até 3 pessoas com o mesmo IP.
Lua:
local tp_mineracao = {x = 123, y = 123, z = 8}
local areasMineracao = {
[1] = {{x = 123, y = 123, z = 8}, {x = 123, y = 123, z = 8}},
[2] = {{x = 123, y = 123, z = 9}, {x = 123, y = 123, z = 9}},
[3] = {{x = 132, y = 123, z = 10}, {x = 123, y = 123, z = 10}}
}
function onStepIn(cid, item, position, fromPosition, toPosition)
if (not isPlayer(cid)) then
return false
end
for _, v in pairs(areasMineracao) do
for _, pid in pairs(getPlayersOnline()) do
if (getPlayerIp(pid) == getPlayerIp(cid) and isInRange(getThingPos(pid), v[1], v[2])) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Só é permitido 1 jogador por IP na mineração.")
doTeleportThing(cid, fromPosition, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
return true
end
end
end
doTeleportThing(cid, tp_mineracao, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
setPlayerStorageValue(cid, 45393, 1)
return true
end