Guest User

Untitled

a guest
Dec 13th, 2021
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. hook.Add( "EntityTakeDamage", "EntityDamageExample", function( target, dmginfo )
  2.     if ( target:IsPlayer() and                                          -- only checking players
  3.     table.HasValue({TEAM_GASMASK,TEAM_OTHERGASMASK},target:Team()) and  -- enter jobs here
  4.     dmginfo:IsDamageType(1048576)                                       -- find the numbers here: https://wiki.facepunch.com/gmod/Enums/DMG
  5.     ) then
  6.         return true                                                     -- try only "return" if that fails or "return false"
  7.     end
  8. end )
Advertisement
Add Comment
Please, Sign In to add comment