Rambizz1
New member
- Joined
- Feb 2, 2024
- Messages
- 3
- Reaction score
- 0
Hello everyone, I’m wondering how people make this function.
My Silent Aim code is basic but working on every SA:MP server.
I’m using EmulateStunShot and GenerateDamageEvent.
I tested it with my friends — they see the blood, they see the bullet coming towards them, and they get stunned when I use a stunning weapon, but I can’t see any of this on my screen.
Here is the GenerateDamageEvent function I’m using:
Can you guys help me make the blood splatter visible for the local player as well?
My Silent Aim code is basic but working on every SA:MP server.
I’m using EmulateStunShot and GenerateDamageEvent.
I tested it with my friends — they see the blood, they see the bullet coming towards them, and they get stunned when I use a stunning weapon, but I can’t see any of this on my screen.
Here is the GenerateDamageEvent function I’m using:
C++:
//GenerateDamageEvent(CPed, CEntity, eWeaponType, int damage_per_hit, ePedPieceTypes hitpart, int weaponID);
void CWeaponSA::GenerateDamageEvent(CPed* pFiringEntity, CEntity* pEntity, eWeaponType weaponType, int damage_per_hit, int hitpart, int weaponid)
{
DWORD dwFiringEntityInterface = 0;
if (pFiringEntity) dwFiringEntityInterface = (DWORD)pFiringEntity->GetInterface();
DWORD dwTargetEntityInterface = 0;
if (pEntity) dwTargetEntityInterface = (DWORD)pEntity->GetInterface();
DWORD dwThis = (DWORD)internalInterface;
DWORD dwFunc = FUNC_CWeapon_GenerateDamageEvent;
_asm
{
mov ecx, dwThis
push weaponid // int weaponID
push hitpart // int hitpart
push damage_per_hit // int damage_per_hit
push weaponType // eWeaponType
push dwTargetEntityInterface // CEntity interface
push dwFiringEntityInterface // CPed interface
call dwFunc
}
}
Can you guys help me make the blood splatter visible for the local player as well?