Bugged message.
#3

Quote:
Originally Posted by Mic_H
Посмотреть сообщение
PHP код:
    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=0i<MAX_PLAYERSi++)
                    {
                        if(
IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z))
                        {
                            if(
pInfo[i][IsPlayerInfected] == 0)
                            {
                                
infectedcount++;
                                
//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];        
                    
InfectPlayerStandard(i);
                    
GetPlayerName(playerid,pNames,sizeof(pNames));
                    
format(zmstring2,sizeof(zmstring2),""COL_GREEN"%s has been infected "COL_WHITE"%i players.",pNames,infectedcount);
                    
SendClientMessageToAll(-1,zmstring2);
                }
            }
        }
    } 
error 017: undefined symbol "i"
Line: InfectPlayerStandard(i);
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: 3 Guest(s)