SA-MP Forums Archive
saving id who shooted who. - 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: saving id who shooted who. (/showthread.php?tid=615359)



saving id who shooted who. - Maheerali - 21.08.2016

Код:
CMD:heal(playerid, params[])
{
        new id;
	if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "Error: USAGE: heal id");
	SetPlayerHealth(id, 100.0);
}
public OnPlayerTakeDamage(playerid, damagedid, amount, weaponid, bodypart)
{
	if (weaponid == 24)
	{
		hel[damagedid] -= 33;
		tmpScore[playerid] += 3;
	}
//if damageid killed tmpScore[playerid] += score[playerid].
//tmpScore = 0;
//if damageid healed tmpScore[playerid] = 0;
}
Give player score if the damageid is killed in life in which playerid attacked him. If he is healed by healer
so no score to playerid on death after being healed.