need fast help!! loop issue!!
#2

pawn Код:
forward pAliveChecker();//this is a timer checking how many players are still alive...
public pAliveChecker()
{
    new
        Float:survivorhealth[MAX_PLAYERS];

    for(new i=0;i < MAX_PLAYERS; i++)
    {  
        GetPlayerHealth(i,survivorhealth[i]);
        if((survivorhealth[i] > 0) && (IsPlayerConnected(i) == 1))//if only one single player is alive the round ends...
        {
            ChainsawEnder();//this is a stock and its executed like i wrote on top... But it shall be executed only once
            break; // Use break to exit a loop.
        }
    }
    return 1;
}
Please, indent your code next time. By the way, you can find more information here: https://sampwiki.blast.hk/wiki/Keywords:Statements
Reply


Messages In This Thread
need fast help!! loop issue!! - by BlackWolf120 - 03.04.2011, 01:19
Re: need fast help!! loop issue!! - by Miguel - 03.04.2011, 02:26
Re: need fast help!! loop issue!! - by bigcomfycouch - 03.04.2011, 02:36
Re: need fast help!! loop issue!! - by BlackWolf120 - 03.04.2011, 19:01

Forum Jump:


Users browsing this thread: 1 Guest(s)