I believe we are very near
but
What do I wrong?
function OnProjectileHitEntity(ProjectileEntity, Entity) ShooterName = ProjectileEntity:GetCreatorName() --Entity:TakeDamage(DamageType, AttackerEntity, RawDamage, KnockbackAmount) Entity:GetWorld():DoWithPlayer(ShooterName, function(a_Player) Entity:TakeDamage(dtArrow, a_Player, 18, ProjectileEntity:GetPosition()) end ) end
but
Quote:[18:23:02] LUA: Plugins/Sniper/main.lua~:88: error in function 'TakeDamage'.
argument #2 is 'number'; 'cEntity' expected.
[18:23:02] Stack trace:
[18:23:02] [C](-1): TakeDamage
[18:23:02] Plugins/Sniper/main.lua~(88): (no name)
[18:23:02] [C](-1): DoWithPlayer
[18:23:02] Plugins/Sniper/main.lua~(86): (no name)
[18:23:02] Stack trace end
[18:23:02] Error in <attached> calling function <callback>()
[18:23:02] LUA: Plugins/Sniper/main.lua~:88: error in function 'TakeDamage'.
argument #2 is 'number'; 'cEntity' expected.
[18:23:02] Stack trace:
[18:23:02] [C](-1): TakeDamage
[18:23:02] Plugins/Sniper/main.lua~(88): (no name)
[18:23:02] [C](-1): DoWithPlayer
[18:23:02] Plugins/Sniper/main.lua~(86): (no name)
[18:23:02] Stack trace end
[18:23:02] Error in <attached> calling function <callback>()
What do I wrong?