GetPlayerDeathReasonName?? or similar
#1

somewhere I read something like "GetPlayerDeathReasonName" Have you ever heard? is a way to get letters in the cause of death?
Reply
#2

How would you like use it?
Used to Callback, or a simple function ?
Reply
#3

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;
}
Reply
#4

Quote:
Originally Posted by Malice
pawn Код:
GetWeaponName(reason, string, sizeof(string))
How is that related?...


OnPlayerDeath also returns the reason.
Reply
#5

Quote:
Originally Posted by Malice
pawn Код:
GetWeaponName(reason, string, sizeof(string))


Just found the example.

https://sampwiki.blast.hk/wiki/GetWeaponName
thx
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)