Why its send two times (ONPLAYERDEATH)
#1

Hi
this message duplicate if i infect anyone. It's sending two times.
Код:
    if(teams[playerid] == TEAM_ZOMBIE)
    {
    if(pInfo[playerid][pZombieClass] == BOOMERZOMBIE)
    {
    new explodecount;
    GetPlayerPos(playerid,Float:x,Float:y,Float:z);
    CreateExplosion(Float:x,Float:y,Float:z,0,6.0);
    foreach(new i : Player)
    {
    GetClosestPlayer(i);
    if(IsPlayerConnected(i))
    {
   	switch(GetPlayerSkin(i))
    {
    case NON_IMMUNE:
    {
    if(i == playerid) continue;
    if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z))
    {
    if(pInfo[i][IsPlayerInfected] == 0)
    {
    InfectPlayerStandard(i);
    explodecount++;
    }
    }
    }
    }
    }
    }
    if(explodecount > 0)
    {
    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,explodecount);
    SendClientMessageToAll(-1,zmstring2);
    }
    }
    }
	}
Reply


Messages In This Thread
Why its send two times (ONPLAYERDEATH) - by Pokemon64 - 07.03.2017, 12:37
Re: Why its send two times (ONPLAYERDEATH) - by K9IsGodly - 07.03.2017, 12:59
Re: Why its send two times (ONPLAYERDEATH) - by Pokemon64 - 07.03.2017, 13:02
Re: Why its send two times (ONPLAYERDEATH) - by TitanX - 07.03.2017, 13:19
Re: Why its send two times (ONPLAYERDEATH) - by Pokemon64 - 07.03.2017, 13:29
Re: Why its send two times (ONPLAYERDEATH) - by Sew_Sumi - 07.03.2017, 15:12
Re: Why its send two times (ONPLAYERDEATH) - by Sithis - 07.03.2017, 15:37
Re: Why its send two times (ONPLAYERDEATH) - by Pokemon64 - 07.03.2017, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)