Bugged message.
#7

Код:
 if(PRESSED(KEY_WALK)) 
    { 
        new infectedcount; 
        if(team[playerid] == TEAM_ZOMBIE) 
        { 
            if(pInfo[playerid][pZombieClass] == ADVANCEDBOOMER) 
            { 
                if(IsPlayerInRangeOfPoint(playerid,8.0,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ])) 
                { 
                    GameTextForPlayer(playerid,"~r~You cant explode yourself near zombie spawn!",4000,5); 
                } 
                else 
                { 
                    new Float:x,Float:y,Float:z; 
                    GetPlayerPos(playerid,Float:x,Float:y,Float:z); 
                    SetPlayerHealth(playerid,0.0); 
                    CreateExplosion(Float:x,Float:y,Float:z,0,6.0); 
                    for(new i=0; i<MAX_PLAYERS; i++) 
                    { 
                        if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z)) 
                        { 
                            if(pInfo[i][IsPlayerInfected] == 0) 
                            { 
                                infectedcount++; 
                                InfectPlayerStandard(i);
                                //It was bugged because you added it inside the forloop.. while the "InfectedCount". was still being counted. 
                                //Show it after the for(loop) 
                            } 
                        } 
                    } 
                    //Like this 
                    new zmstring2[256],pNames[MAX_PLAYER_NAME];         
                   
                    GetPlayerName(playerid,pNames,sizeof(pNames)); 
                    format(zmstring2,sizeof(zmstring2),""COL_GREEN"%s has been infected "COL_WHITE"%i players.",pNames,infectedcount); 
                    SendClientMessageToAll(-1,zmstring2); 
                } 
            } 
        } 
    }
Reply


Messages In This Thread
Bugged message. - by henkas - 09.02.2017, 16:12
Re: Bugged message. - by Mic_H - 09.02.2017, 16:31
Re: Bugged message. - by henkas - 09.02.2017, 16:48
Re: Bugged message. - by henkas - 09.02.2017, 17:34
Re: Bugged message. - by henkas - 10.02.2017, 08:46
Re: Bugged message. - by henkas - 10.02.2017, 11:53
Re: Bugged message. - by ThatFag - 10.02.2017, 12:25
Re: Bugged message. - by henkas - 10.02.2017, 12:38
Re: Bugged message. - by henkas - 10.02.2017, 12:45
Re: Bugged message. - by Mic_H - 10.02.2017, 14:47

Forum Jump:


Users browsing this thread: 4 Guest(s)