When A player kills sombody eles they get a score.
#3

Quote:
Originally Posted by SampStunta
Посмотреть сообщение
pawn Код:
SetPlayerScore(playerid, +1); //Or whatever score you gain
Have never really wanted to try :S
Errors, errors and more errors.
This will not work for obvious reasons.

@Hayden_Bruin you have it right, just get rid of the negative sign you have.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason) {
    SetPlayerScore(killerid, GetPlayerScore(killerid) + 1); //this or
    SetPlayerScore(playerid, GetPlayerScore(playerid) - 1); //this or
        //SetPlayerScore(thisplayertogan, GetPlayerScore(thescoreoftheplayer) + 1);
    KillingSpree[killerid]++;
    KillingSpree[playerid] = 0;

    if(KillingSpree[killerid] == 3) {
        new pname[24];
        new string[256];
        GetPlayerName(killerid,pname,24);
        format(string,sizeof(string), "Watch Out For %s, Hes On A 3 Man Kill Streak.",pname);
        SendClientMessageToAll(COLOR_YELLOW,string);
    }
    return 1;
}
Add a point/score to the Killer (killerid) and subtract a score/point from the Killed (playerid)
Reply


Messages In This Thread
When A player kills sombody eles they get a score. - by Haydz - 26.10.2010, 10:16
Re: When A player kills sombody eles they get a score. - by SampStunta - 26.10.2010, 10:35
Re: When A player kills sombody eles they get a score. - by mrmuffins - 26.10.2010, 11:45
Re: When A player kills sombody eles they get a score. - by SkizzoTrick - 26.10.2010, 11:50
Re: When A player kills sombody eles they get a score. - by SampStunta - 26.10.2010, 12:52
Re: When A player kills sombody eles they get a score. - by Celson - 26.10.2010, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)