Increase counter
#1

hi,

just a tiny question:

im counting the played rounds on my server like this:

pawn Код:
//defining
new RoundsPlayedCouter[MAX_PLAYERS];

//at the end of the round
for(new i = 0; i < MAX_PLAYERS; i++)
{
RoundsPlayedCouter[i]++;
}
But im confused.
Would this only increase this value of every player on the server (+1)
or would it increase this value of every player with the amount of the currently connected players? (+CurrentlyConnectedPlayerAmount)

regards.
Reply
#2

Just by 1 for every player.
Reply
#3

ah ok.
thx for ur answer.
My round statistics dont seem to work.
Is it right to do it like this:

pawn Код:
new KillsInRound[MAX_PLAYERS];
new DeathsInRound[MAX_PLAYERS];


//OnPlayerConnect

KillsInRound[playerid] = 0;
DeathsInRound[playerid] = 0;


//OnPlayerDeath

     DeathsInRound[playerid]++;
     if(killerid!=INVALID_PLAYER_ID)
     {
        KillsInRound[killerid]++;
     }


//reset after round ends

for(new i = 0; i < MAX_PLAYERS; i++)
{
KillsInRound[i] = 0;
DeathsInRound[i] = 0;
}
the kills and deaths amount is mostly wrong.
Is it possible to count the round kills/deaths like this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)