SA-MP Forums Archive
kill - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: kill (/showthread.php?tid=149242)



kill - shoru93 - 21.05.2010

How to make if i kill someone to recieve a message: you killed player? on player kill player or...?


Re: kill - Calgon - 21.05.2010

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;
}