09.02.2017, 16:12
Hi!
I got one issue so we test infection message when you explode and near player should get infected and send message how much player i infect, bat its bugged so look.
So its should send "You infect 1 player" something like this bat idk why its shows and you infect player 2 its just bugged. My code
What wrong with it?
I got one issue so we test infection message when you explode and near player should get infected and send message how much player i infect, bat its bugged so look.
So its should send "You infect 1 player" something like this bat idk why its shows and you infect player 2 its just bugged. My code
Код:
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) { new zmstring2[256],pNames[MAX_PLAYER_NAME]; infectedcount++; 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); }