Calling KillerID under OnPlayerWeaponShot
#1

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.
Reply
#2

Change killerid with issuerid

Edit: why are you doing this OnPlayerWeaponShot?
Reply
#3

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?
Reply
#4

Do this under OnPlayerGiveDamage!
Reply
#5

https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Check the example code given here, it will give you an idea... Problem solved
Reply
#6

Quote:
Originally Posted by [ND]xXZeusXx.
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Check the example code given here, it will give you an idea... Problem solved
Thanks! +rep'ed
Reply
#7

Cheers! Reped back
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)