Any ideas why system doesn't work?
#1

Hi
I have one bug bat i have no clue why explosion doesn't work if i stand near people bat if i run away and try explode everything ok.

Код:
    if(PRESSED(KEY_WALK))
    {
    new infectedcount;
    if(teams[playerid] == TEAM_ZOMBIE)
    {
    if(pInfo[playerid][pZombieClass] == ADVANCEDBOOMER)
    {
    new victimid = GetClosestPlayer(playerid);
    if(IsPlayerInRangeOfPoint(playerid,4.0,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]) || IsPlayerInRangeOfPoint(playerid,4.0,Map[ZombieSpawn2X],Map[ZombieSpawn2Y],Map[ZombieSpawn2Z]))
    {
    GameTextForPlayer(playerid,"~r~You can't!",4000,5);
    }
    else
    {
    switch(GetPlayerSkin(victimid))
	{
    case NON_IMMUNE,249:
	{
    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(i == playerid) continue;

    if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z))
    {
    if(pInfo[i][IsPlayerInfected] == 0)
    {
    infectedcount++;
    InfectPlayerStandard(i);
    }
    }
    }
    if(infectedcount > 0)
    {
    new zmstring2[256],pNames[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pNames,sizeof(pNames));
    format(zmstring2,sizeof(zmstring2),""COL_GREEN">> %s has been explode "COL_WHITE"%i players.",pNames,infectedcount);
    SendClientMessageToAll(-1,zmstring2);
    }
    }
    }
    }
	}
    }
    }
If you know why please explain.
Reply


Messages In This Thread
Any ideas why system doesn't work? - by henkas - 16.03.2017, 18:54
Re: Any ideas why system doesn't work? - by Toroi - 16.03.2017, 19:08
Re: Any ideas why system doesn't work? - by henkas - 16.03.2017, 19:11
Re: Any ideas why system doesn't work? - by henkas - 16.03.2017, 19:25
Re: Any ideas why system doesn't work? - by Toroi - 16.03.2017, 19:40
Re: Any ideas why system doesn't work? - by Pokemon64 - 16.03.2017, 19:48
Re: Any ideas why system doesn't work? - by Toroi - 16.03.2017, 19:54
Re: Any ideas why system doesn't work? - by Pokemon64 - 16.03.2017, 20:05
Re: Any ideas why system doesn't work? - by henkas - 16.03.2017, 21:18

Forum Jump:


Users browsing this thread: 1 Guest(s)