07.03.2017, 12:37
Hi
this message duplicate if i infect anyone. It's sending two times.
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); } } } }