Looping a command problem
#4

pawn Код:
CMD:heal(playerid, params[])
{
    if(PlayerTeam[playerid] == TEAM_MEDIC)
    {
        new bool:PlayerFounded;
        for(new i=0; i<MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && i != playerid)
            {
                if(GetDistanceBetweenPlayers(playerid,i) < AVAILABLE_DISTANCE)
                {
                    PlayerFounded = true;
                }
            }
        }
        if(!PlayerFounded)
            SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Error: {FFFFFF}There are no players close enough to heal.");
    }
Reply


Messages In This Thread
Looping a command problem - by AnonScripter - 23.01.2014, 00:42
Re: Looping a command problem - by Jefff - 23.01.2014, 01:12
Re: Looping a command problem - by AnonScripter - 23.01.2014, 01:33
Re: Looping a command problem - by Jefff - 23.01.2014, 01:52

Forum Jump:


Users browsing this thread: 1 Guest(s)