Ir para conteúdo

Featured Replies

Postado
  • Solução
-- <event type="attack" name="onAttack" script="onAttack.lua"/>

local level = 450

function onAttack(cid, target)
	if not isPlayer(cid) or not isPlayer(target) then 
		return true
	end

	if getPlayerLevel(cid) >= level and getPlayerLevel(target) < level then
		return false
	elseif getPlayerLevel(target) >= level and getPlayerLevel(cid) < level then
		return false
	end

	return true
end

 

  • Respostas 12
  • Visualizações 780
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    -- <event type="attack" name="onAttack" script="onAttack.lua"/> local level = 450 function onAttack(cid, target) if not isPlayer(cid) or not isPlayer(target) then return true end if get

  • luanluciano93
    luanluciano93

    -- <event type="target" name="onTarget" script="onTarget.lua"/> local level = 450 function onTarget(cid, target) if not isPlayer(cid) or not isPlayer(target) then return true end if get

Postado
  • Autor
10 minutos atrás, luanluciano93 disse:

-- <event type="attack" name="onAttack" script="onAttack.lua"/>

local level = 450

function onAttack(cid, target)
	if not isPlayer(cid) or not isPlayer(target) then 
		return true
	end

	if getPlayerLevel(cid) >= level and getPlayerLevel(target) < level then
		return false
	elseif getPlayerLevel(target) >= level and getPlayerLevel(cid) < level then
		return false
	end

	return true
end

 

 

Esse script vai bloquear os niveis maior que 450 não atacar 450 menos? e também fazer os niveis baixo poder atacar uns aos outros normal só não atacando os niveis mais alto ?

Postado
Em 23/09/2019 em 22:28, luanluciano93 disse:

-- <event type="attack" name="onAttack" script="onAttack.lua"/>

local level = 450

function onAttack(cid, target)
	if not isPlayer(cid) or not isPlayer(target) then 
		return true
	end

	if getPlayerLevel(cid) >= level and getPlayerLevel(target) < level then
		return false
	elseif getPlayerLevel(target) >= level and getPlayerLevel(cid) < level then
		return false
	end

	return true
end

 

 

eu tentei fazer não abrir pk caso der o erro porém sem sucesso alguma idéia?

Projeto ATS (Naruto)

Informações Abaixo

Facebook

Youtube
Discord

 

Tutoriais / Conteúdos

Clique Aqui

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 520.1k

Informação Importante

Confirmação de Termo