FeniXMTA Posted July 22, 2018 Share Posted July 22, 2018 (edited) 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 July 22, 2018 by FeniXMTA Link to comment
xMKHx Posted July 22, 2018 Share Posted July 22, 2018 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) Link to comment
Mahlukat Posted July 22, 2018 Share Posted July 22, 2018 Canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead. Link to comment
FeniXMTA Posted July 22, 2018 Author Share Posted July 22, 2018 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 ? Link to comment
DaeRoNz Posted July 23, 2018 Share Posted July 23, 2018 Talvez este tópico o possa ajudar . Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now