Distance kills
#6

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