Garry's Mod Wiki

Entity:GetPhysicsAttacker

  Player Entity:GetPhysicsAttacker( number timeLimit = 1 )

Description

Returns player who is claiming kills of physics damage the entity deals.

Arguments

1 number timeLimit = 1
The time to check if the entity was still a proper physics attacker.
Some entities such as the Combine Ball disregard the time limit and always return the physics attacker.

Returns

1 Player
The player. If entity that was set is not a player, it will return NULL entity.