SA-MP Forums Archive
Damage System 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: Damage System Help (/showthread.php?tid=455641)



Damage System Help - Gaurav_Rawat - 02.08.2013

Hello Scripters
I would like your little help in here,I tried to create a damage system for my script but its not kinda working mind giving me a hand ?


pawn Code:
if(team[issuerid] == TEAM_A)
    {
        if(pInfo[issuerid][MP5] == 1 || pInfo[issuerid][Deagle] == 1)
        {
            if(team[playerid] == TEAM_B)
            {
                if(weaponid == 24)
                {
                    new Float:hp;
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid, hp - 70);
                }else if(weaponid == 29)
                {
                    new Float:hp;
                    GetPlayerHealth(playerid,hp);
                    SetPlayerHealth(playerid, hp - 45);
                }
            }
        }
    }
I am using OnPlayerTakeDamage callback for it


Re: Damage System Help - [XST]O_x - 02.08.2013

That should help you out:
http://forum.sa-mp.com/showpost.php?...53&postcount=7