SA-MP Forums Archive
Little Help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Little Help! (/showthread.php?tid=512419)



Little Help! - Sanady - 10.05.2014

Hello again. I want to create my own weapon damage system. But which function is checking how much damage which weapon take anyone know? I was searching but I didn`t find.. Anyone?


Re: Little Help! - Twizted - 10.05.2014

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    if(weaponid == /*weapon id*/) SetPlayerHealth(playerid, /*the player's HP - normally it follows "HP - x", where x is the ammount of damage taken by each shot*/);
    return 1;
}