31.03.2015, 08:26
Use GetPlayerName and fomat the message, then send it.
https://sampwiki.blast.hk/wiki/GetPlayerName
https://sampwiki.blast.hk/wiki/Format
EDIT: @JaydenJason, playerid is an integer, not a string.
pawn Код:
new Name[MAX_PLAYER_NAME], string[20 + MAX_PLAYER_NAME];
// Declares 2 arrays, "Name" and "string"
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
// Stores the players name in the "Name" array as a string
format(string, siezeof(string), "%s has killed himself.", Name);
// Formats "string" to contain the message above, where %s will be "Name"
SendClientMessageToAll(-1, string);
// Sends the message "string" contains
https://sampwiki.blast.hk/wiki/Format
EDIT: @JaydenJason, playerid is an integer, not a string.