Here's the official documentation if you haven't found it by now:
http://amxmodx.org/api/engine_stocks/fakedamage
If a function is a stock (has
stock in front of the function name), it means it's implemented in PAWN. Just click the
File link in the upper right corner of the page and find the function in there.
If it is a
native however, like
radius_damage() is (
RadiusDamage() just calls
radius_damage()), its implementation is found within the AMXX (or its modules). You can easily browse through the code at
GitHub or
Cross Reference.
To answer your question: you could call TakeDamage on victim
Code:
/**
* Description: Usually called whenever an entity takes any kind of damage.
* Inflictor is the entity that caused the damage (such as a gun).
* Attacker is the entity that tirggered the damage (such as the gun's owner).
* Forward params: function(this, idinflictor, idattacker, Float:damage, damagebits);
* Return type: Integer.
* Execute params: ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits);
*/
Ham_TakeDamage
Just like so:
PHP Code:
ExecuteHamB(Ham_TakeDamage, Victim, Inflictor, Attacker, Float: Damage, DamageType);
You could pass attacker ID to both inflictor and attacker, shouldn't matter. For DamageType
DMG_GENERIC should do okay, but if you want to go more in-depth about damage types,
here.
EDIT:
Sending the explosion to different location works the way you did it, but the thing is, you have overridden
fOrigin[]'s value by calling
pev() and saving its result into that array. You should take the execution order in account too.