06.12.2009, 13:51
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;
}