[UNSOLVED]Find Out Who Killed Who.
#8

Quote:
Originally Posted by Giacomand
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  if(PlayerIsInDM[killerid] == false)
  {
new string [128];
new pName2[MAX_PLAYER_NAME];
GetPlayerName(killerid, pName2, sizeof(pName2));
format(string, sizeof(string), "KICKED: %s has been auto kicked by console.", pName2);
SendClientMessageToAll(COLOR_RED, string);
    Kick(killerid);
  }
This is somewhat better but it won't check for suicide.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    // Added check for INVALID_PLAYER_ID and cleaned up the code:
    if(killerid != INVALID_PLAYER_ID && !PlayerIsInDM[killerid])
    {
        new
            sMsg[128];
       
        GetPlayerName(killerid, sMsg, MAX_PLAYER_NAME);
       
        format(sMsg, sizeof(sMsg), "KICKED: %s has been auto kicked by console.", sMsg);
        SendClientMessageToAll(COLOR_RED, sMsg);

        Kick(killerid);
    }
}
Reply


Messages In This Thread
[UNSOLVED]Find Out Who Killed Who. - by BP13 - 16.06.2010, 23:49
Re: Find Out Who Killed Who. - by CyNiC - 16.06.2010, 23:53
Re: Find Out Who Killed Who. - by (.Aztec); - 17.06.2010, 01:34
Re: Find Out Who Killed Who. - by CyNiC - 17.06.2010, 02:31
Re: Find Out Who Killed Who. - by (.Aztec); - 17.06.2010, 02:49
Re: Find Out Who Killed Who. - by BP13 - 17.06.2010, 02:52
Re: [UNSOLVED]Find Out Who Killed Who. - by Giacomand - 17.06.2010, 03:15
Re: [UNSOLVED]Find Out Who Killed Who. - by Simon - 17.06.2010, 03:58
Re: [UNSOLVED]Find Out Who Killed Who. - by BP13 - 17.06.2010, 12:08
Re: [UNSOLVED]Find Out Who Killed Who. - by dcmd_crash - 17.06.2010, 12:25

Forum Jump:


Users browsing this thread: 2 Guest(s)