How to make if i kill someone to recieve a message: you killed player? on player kill player or...?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if( killerid != INVALID_PLAYER_ID )
{
new
String[128],
Names[ 2 ][ MAX_PLAYER_NAME ];
GetPlayerName( playerid, Names[ 1 ], MAX_PLAYER_NAME );
GetPlayerName( killerid, Names[ 0 ], MAX_PLAYER_NAME );
format( String, sizeof( String ), "Hello %s, you have killed %s.", Names[ 0 ], Names[ 1 ] );
SendClientMessage( killerid, colour, String );
}
return 1;
}