SA-MP Forums Archive
The last player who was shot. - 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: The last player who was shot. (/showthread.php?tid=559279)



The last player who was shot. - _Application_ - 22.01.2015

The last player was hit by a bullet.


How i to do it?, please help me


Re: The last player who was shot. - Rudy_ - 22.01.2015

what?


Re: The last player who was shot. - Schneider - 22.01.2015

Like this?
pawn Код:
new LastShotPlayer = INVALID_PLAYER_ID;

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        LastShotPlayer = playerid;
    }
    return 1;
}



Re: The last player who was shot. - Arxalan - 22.01.2015

Quote:
Originally Posted by Schneider
Посмотреть сообщение
Like this?
pawn Код:
new LastShotPlayer = INVALID_PLAYER_ID;

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        LastShotPlayer = playerid;
    }
    return 1;
}
I think he wanted to have a function that when he type /lastshot(or any cmd) so he get message about the person who shot him last time e.g. "You was shoot last time by (shooter name)".