nokizorque

aurora no dm niggas

Apr 9th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function preventDM(attacker)
  2.     if (attacker and attacker.type == "player" or attacker.type == "vehicle" and attacker ~= source) then
  3.         if (attacker.dimension == 0 and source.dimension == 0) then
  4.             return false
  5.         end
  6.         if (attacker.type == "vehicle") then
  7.             local driver = attacker.controller
  8.             if (isElement(driver) and driver.type == "player" and driver ~= source) then
  9.                 attacker = driver
  10.             end
  11.         end
  12.         if ((attacker.type == "player" and attacker.team.name == "Criminals" or attacker.team.name == "Civilian Workers") and exports.server:getPlayerChatZone(attacker) ~= "LV") then
  13.             if ((source.team.name == "Criminals" or source.team.name == "Civilian Workers") and exports.server:getPlayerChatZone(source) ~= "LV") then
  14.                 cancelEvent()
  15.             end
  16.         end
  17.     end
  18. end
  19. addEventHandler("onClientPlayerDamage", root, preventDM)
Advertisement
Add Comment
Please, Sign In to add comment