Recommended Posts

Olá,

Preciso de ajuda no servidor .lua

function AntKill(attacker,weapon, bodypart, loss)
suspeito = getAccountName(getPlayerAccount(attacker))
vitima = getAccountName(getPlayerAccount(source))
if isObjectInACLGroup("user."..suspeito, aclGetGroup("teste")) then
 if isObjectInACLGroup("user."..vitima, aclGetGroup("teste")) then
   if not ( attacker == source ) then
      outputChatBox("TESTE",source,255,255,255,true)
     cancelEvent()
       end
      end
    end
end
addEventHandler("onPlayerDamage", root, AntKill)

Essa função server para quem estiver na mesma Acl,nao conseguir um matar o outro,mais ela não esta funcionando.

Alguem da uma força ai pra me ajudar.

Edited by FeniXMTA

Share this post


Link to post
function AntKill ( attacker , weapon , bodypart , loss )
suspect = getAccountName ( getPlayerAccount ( attacker )) 
victim = getAccountName ( getPlayerAccount ( source )) 
  if (attacker == source) then return false end
if ( isObjectInACLGroup ( "user." ... suspect , aclGetGroup ( "test" )) and isObjectInACLGroup ( "user." .. victim , aclGetGroup ( "test" )) ) then      
      outputChatBox ("TEST",source,255,255,255,true)
     cancelEvent ()
       end
      end
addEventHandler (" onPlayerDamage ",root,AntKill)

 

Share this post


Link to post
6 hours ago, Mahlukat said:
  • Cancelar este evento não tem efeito. Cancele o evento do lado do cliente onClientPlayerDamage .   

Voce fala fazer pelo Client e puxa pro server com o Event ?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.