27.07.2019, 11:12
Quote:
No, you can't use this function in OnPlayerDamage. You need to call it before OnPlayerDamage.
However we could look at OnPlayerDamage. public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) You could change the damage in OnPlayerDamage, this has the float value of "amount". |
Code:
switch (weaponid) { // The spas shotguns shoot 8 bullets, each inflicting 4.95 damage case WEAPON_SHOTGSPA: { bullets = amount / 4.950000286102294921875; if (8.0 - bullets < -0.05) { return WC_INVALID_DAMAGE; } }