• Get list of players damaged by grenade
    1 replies, posted
I would like to create a swep which runs a function on anyone damaged by a grendae, how would I go about getting the list of entities hit by it?
GM/EntityTakeDamage Example: somethingunique = {} function GM:EntityTakeDamage( target, dmginfo ) if ( target:IsPlayer() and dmginfo:IsExplosionDamage() and dmginfo:GetInflictor() == "weapon_grenade" ) then table.insert( somethingunique, target ) PrintTable( somethingunique ) end end It should just print every player who took damage, then all you have to do is table.Empty()
Sorry, you need to Log In to post a reply to this thread.