Players Alive counter doesn't go down OnPlayerDisconnect
#8

Im sorry for the big delay, i've been abit busy this days
I've done what you sent me @Danice
and here are the results according to the code you gave me:
Код:
[22:47:24] [chat] [Andre]: u want to leave or i do ?
[22:47:42] I: 0
[22:47:42] Highest Player ID: 1
[22:47:42] I: 1
[22:47:42] Highest Player ID: 1
[22:47:42] [part] Jonny has left the server (1:1)
and it still doesn't remove 1 when the player leaves

also it's weird because it didn't print the:
PHP код:
printf("[playerid][DM]: %i || [i][DM]: %i || Alive Players: %i",pInfo[playerid][DM],pInfo[i][DM],AlivePlayers); 
nor
PHP код:
printf("AlivePlayers - 1: %i",AlivePlayers); 
but
PHP код:
printf("I: %i",i);
printf("Highest Player ID: %i",j); 
twice

here is my code:
PHP код:
    new alive[3];
    for(new 
0GetPlayerPoolSize(); <= ji++)
    {
        
printf("I: %i",i);
        if (
pInfo[playerid][DM] && pInfo[i][DM] == 1)
        {
            
printf("[playerid][DM]: %i || [i][DM]: %i || Alive Players: %i",pInfo[playerid][DM],pInfo[i][DM],AlivePlayers);
            
AlivePlayers -= 1;
            
printf("AlivePlayers - 1: %i",AlivePlayers);
            
format(alivesizeof(alive), "%02d"AlivePlayers);
            
TextDrawSetString(numberalalive);
            
TextDrawShowForPlayer(ialbox1);
            
TextDrawShowForPlayer(ialbox2);
            
TextDrawShowForPlayer(iAlive);
            
TextDrawShowForPlayer(inumberal);
        }
        
printf("Highest Player ID: %i",j);
    }
    return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)