Calling KillerID under OnPlayerWeaponShot - 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: Calling KillerID under OnPlayerWeaponShot (
/showthread.php?tid=593824)
Calling KillerID under OnPlayerWeaponShot -
DemME - 10.11.2015
Hey, I'm trying to make a death system when player gets damage, it will notify the people around and himself who shoot who, here is the code.
Код:
// DEATH SYSTEM //
if(weaponid == 24 && hittype == BULLET_HIT_TYPE_PLAYER) //HIT PLAYER WITH DEAGLE
{
SendNearbyMessage(playerid, 20.0, COLOR_GREY, "(( Death: %s was injured by %s {Desert Eagle}. ))", ReturnName(killerid), ReturnName(playerid));
}
But I can't use the Killerid, because it's not in the public itself.
Re: Calling KillerID under OnPlayerWeaponShot -
Ritzy2K - 10.11.2015
Change killerid with issuerid
Edit: why are you doing this OnPlayerWeaponShot?
Re: Calling KillerID under OnPlayerWeaponShot -
DemME - 10.11.2015
Quote:
Originally Posted by [ND]xXZeusXx.
Change killerid with issuerid
Edit: why are you doing this OnPlayerWeaponShot?
|
Because I want it to notify whenever player shoots another, why? where I should've to put it?
Re: Calling KillerID under OnPlayerWeaponShot -
Ritzy2K - 10.11.2015
Do this under OnPlayerGiveDamage!
Re: Calling KillerID under OnPlayerWeaponShot -
Ritzy2K - 10.11.2015
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Check the example code given here, it will give you an idea... Problem solved
Re: Calling KillerID under OnPlayerWeaponShot -
DemME - 10.11.2015
Quote:
Originally Posted by [ND]xXZeusXx.
|
Thanks! +rep'ed
Re: Calling KillerID under OnPlayerWeaponShot -
Ritzy2K - 10.11.2015
Cheers! Reped back