GetPlayerDeathReasonName?? or similar - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GetPlayerDeathReasonName?? or similar (
/showthread.php?tid=112233)
GetPlayerDeathReasonName?? or similar -
ft941 - 06.12.2009
somewhere I read something like "GetPlayerDeathReasonName" Have you ever heard? is a way to get letters in the cause of death?
Re: GetPlayerDeathReasonName?? or similar -
godknightx - 06.12.2009
How would you like use it?
Used to Callback, or a simple function ?
Re: GetPlayerDeathReasonName?? or similar -
Malice - 06.12.2009
pawn Код:
GetWeaponName(reason, string, sizeof(string))
Just found the example.
https://sampwiki.blast.hk/wiki/GetWeaponName
From the Wiki:
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
new gunname[32], string[64], fName[MAX_PLAYER_NAME], sName[MAX_PLAYER_NAME];
GetWeaponName(reason,gunname,sizeof(gunname));
GetPlayerName(playerid,fName,MAX_PLAYER_NAME);
GetPlayerName(killerid,sName,MAX_PLAYER_NAME);
format(string,sizeof(string),"%s has wasted %s using a %s.",sName,fName,gunname);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}
Re: GetPlayerDeathReasonName?? or similar -
MenaceX^ - 06.12.2009
Quote:
Originally Posted by Malice
pawn Код:
GetWeaponName(reason, string, sizeof(string))

|
How is that related?...
OnPlayerDeath also returns the reason.
Re: GetPlayerDeathReasonName?? or similar -
ft941 - 06.12.2009
Quote:
Originally Posted by Malice
|
thx