Will this work?
#10

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInfo[playerid][pDeaths] += 1;

    if(killerid == INVALID_PLAYER_ID) //If their is no killer
    {
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]");
        SendClientMessage(playerid, COLOR_GRAD1, "You have commited suicide.");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]");
    }
    else if(killerid != INVALID_PLAYER_ID) //else if their is a killer
    {
        new str[200];
        new name1[MAX_PLAYER_NAME];
        new name2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name1, sizeof(name1));
        GetPlayerName(killerid, name2, sizeof(name2));
        format(str, sizeof(str), "» You hunted %s(%i) down, gained: $10000 | Killer: %s(%i)", name1, playerid, name2, killerid);
        GivePlayerMoney(killerid, 10000);
        PlayerInfo[killerid][pKills] += 1;
        SendDeathMessage(killerid, playerid, reason);
        SendClientMessage(killerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]");
        SendClientMessage(killerid, COLOR_GRAD1, str);
        SendClientMessage(killerid, COLOR_LIGHTBLUE, "[=================| BOOM |=================]");
    }
    return 1;
}
Reply


Messages In This Thread
Will this work? - by Ihsan_Cingisiz - 14.08.2010, 23:05
Re: Will this work? - by gamer931215 - 14.08.2010, 23:15
Re: Will this work? - by Niixie - 14.08.2010, 23:19
Re: Will this work? - by Ihsan_Cingisiz - 14.08.2010, 23:19
Re: Will this work? - by Ihsan_Cingisiz - 14.08.2010, 23:22
Re: Will this work? - by Niixie - 14.08.2010, 23:23
Re: Will this work? - by Ihsan_Cingisiz - 14.08.2010, 23:24
Re: Will this work? - by Ihsan_Cingisiz - 14.08.2010, 23:52
Re: Will this work? - by gamer931215 - 14.08.2010, 23:58
Re: Will this work? - by PotH3Ad - 15.08.2010, 00:02

Forum Jump:


Users browsing this thread: 2 Guest(s)