#1

I am having a problem with my system for giving points, what it is suppose to do is take one point away from the player who died and give one pointto the player who killed him but only the person dieing is losing the point the killer isnt getting anything.
Код:
if( gPlayerClass[killerid] != ADMIN) {
        deaths[playerid] = deaths[playerid] + 1;
        kills[killerid] = kills[killerid] + 1;
    }
Reply
#2

pawn Код:
deaths[playerid]++;
kills[killerid]++;

// examples:
deaths[playerid]+= 5; // will add 5 to the variable
deaths[playerid]++; // will add one to the variable
kills[playerid]-= 5; // will remove 5 from the variable
kills[playerid]--; // will remove one from the variable
Reply
#3

is this not just going to add to the players kills where i am try to add a point to his score.
Reply
#4

pawn Код:
deaths[playerid]++;
kills[killerid]++;
Thats the only thing you have to add to the callback OnplayerDeath, that will add 1 'score' to his deaths variable, and 1 'score' to the kills variable
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)