SA-MP Forums Archive
Sniper hart choose - 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: Sniper hart choose (/showthread.php?tid=445766)



Sniper hart choose - ProjectFutureRolePlay - 22.06.2013

Hey sry to bother guys but I just want to make RP system for hitmans of that how can I make that by two shoots sniper can kill somone with armor 100% even , Only by sniper ? Somone knows ?
Ty and sry for bother.


Re: Sniper hart choose - s0nic - 23.06.2013

Check out OnPlayerTakeDamage
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage


Re: Sniper hart choose - ProjectFutureRolePlay - 23.06.2013

Thank you very much sir.


Re: Sniper hart choose - ProjectFutureRolePlay - 23.06.2013

Sir , Doesnt work
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
	if(issuerid != INVALID_PLAYER_ID)
	{
	    ShotPlayer[issuerid][playerid] = gettime();
	    LastShot[playerid] = gettime();
	}
     else if(issuerid != INVALID_PLAYER_ID && weaponid == 34)
    {
        // One shot to kill with sniper rifle
        SetPlayerHealth(playerid, 0.0);
    }
    else if(issuerid != INVALID_PLAYER_ID && weaponid == 38)
    {
        // One shot to kill with Minigun
        SetPlayerHealth(playerid, 0.0);
    }
	return 1;
}
Would you can fix it sir please ?