Distance kills
#10

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
     
        new pname[MAX_PLAYER_NAME];
        new string[95];
        if(killerid != INVALID_PLAYER_ID) //
        {
        GetPlayerName(killerid,pname,30);
        format(string, sizeof(string),"* You were killed by %s(%d): Distance: %2.f | Weapon: %s",pname,killerid,GetDistanceBetweenPlayers(playerid,killerid),aWeaponNames[reason]);
        SendClientMessage(playerid,COLOR_LIGHTGREEN, string);
format(string, sizeof(string),"* You killed %s(%d): Distance: %2.f | Weapon: %s",pname,killerid,GetDistanceBetweenPlayers(playerid,killerid),aWeaponNames[reason]);
SendClientMessage(killerid,COLOR_LIGHTGREEN, string);
        SendDeathMessage(killerid, playerid, reason);
        SetPlayerScore(playerid,(GetPlayerScore(playerid))-1);
        GivePlayerMoney(playerid, -500);
SetPlayerScore(killerid,(GetPlayerScore(killerid))+1);
        GivePlayerMoney(killerid, 1000);
        SendClientMessage(killerid,COLOR_GREEN,"You earned 1000$");
        SendClientMessage(killerid,COLOR_GREEN,"You won 1pt score");
        SendClientMessage(playerid,COLOR_RED,"You lost 500$");
        SendClientMessage(playerid,COLOR_RED,"You lost 1pt score");
        }
        else
        { //You had a ( instead of a {
        SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
        }
        return 1;
}
Reply


Messages In This Thread
[HELP]Distance kills - by gereter - 26.08.2010, 10:54
Re: Distance kills - by Geso - 26.08.2010, 11:01
Re: Distance kills - by gereter - 26.08.2010, 11:04
Re: Distance kills - by LarzI - 26.08.2010, 11:28
Re: Distance kills - by gereter - 26.08.2010, 11:38
Re: Distance kills - by Cameltoe - 26.08.2010, 11:42
Re: Distance kills - by gereter - 26.08.2010, 11:50
Re: Distance kills - by Cameltoe - 26.08.2010, 11:54
Re: Distance kills - by gereter - 26.08.2010, 12:01
Re: Distance kills - by Cameltoe - 26.08.2010, 12:28

Forum Jump:


Users browsing this thread: 1 Guest(s)