Ir para conteúdo
  • 0

Nao poder entrar no evento 2 jogadores com mesmo IP


roriscrave

Pergunta

5 respostass a esta questão

Posts Recomendados

  • 0

Mude o valor de um storage quando o jogador passar e depois algo assim:

local cid_ip = getPlayerIP(cid)
for _, pid in ipairs(getPlayersOnline()) do
    if getPlayerStorageValue(pid, QUALQUER_STORAGE) == 1 then
        if getPlayerIp(pid) == cid_ip then
            doTeleportThing(cid, fromPos)
            doPlayerSendTextMessage(cid, 27, "You may not pass.")
            return true
        end
    end
end
doPlayerSendTextMessage(cid, 27, "You have entered the event.")
Link para o comentário
Compartilhar em outros sites

  • 0

Testa assim


local eventPlayers = {}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    
    if isInArray(eventPlayers, getPlayerIp(cid)) then
        doPlayerSendCancel(cid, "Somente 1 player por ip.")
        doTeleportThing(cid, fromPosition)
        return false
    end
    
    table.insert(eventPlayers, getPlayerIp(cid))
    return true
end
Editado por amoeba13
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...