05.08.2013, 22:30
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new PlayerName[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
GetPlayerName(killerid, KillerName, sizeof(KillerName));
format(string, sizeof(string), "%s has been killed by %s!", PlayerName, KillerName);
SendClientMessageToAll(0xFFFFFFFF, string);
pInfo[playerid][pDeaths]++;
pInfo[killerid][pKills]++;
return 1;
}
EDIT: Why don't you use THIS instead of:
pawn Код:
new PlayerName[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
GetPlayerName(killerid, KillerName, sizeof(KillerName));
format(string, sizeof(string), "%s has been killed by %s!", PlayerName, KillerName);
SendClientMessageToAll(0xFFFFFFFF, string);