Issue with loop
#7

warning 204: symbol is assigned a value that is never used: "j"
PHP код:
public AFKCheck()
{
    static 
Float:LastPos[MAX_PLAYERS][3];
    new 
Float:xFloat:yFloat:zstring[128];
    for(new 
iGetPlayerPoolSize(); > -1i--)
    {
        if(!
IsPlayerConnected(i) || IsAFK[i]) continue; // add here some !IsPlayerSpawned(i)
        
GetPlayerPos(i,x,y,z);
        if(
IsPlayerInRangeOfPoint(i,2.0,LastPos[i][0],LastPos[i][1],LastPos[i][2]))
        {
            if(
IsAFK[i] == && ++AFK[i] >= 300)
            {
                
IsAFK[i] = 1;
                
format(string,sizeof(string),"*%s has gone AFK",GetName(i));//Formats the /do cmd output
                
SendClientMessageToAll(COLOR_WHITE,string);
            }
        }
        else
        {
            if(
IsAFK[i] == && AFK[i] >= 300)
            {
                
IsAFK[i] = 0;
                
AFK[i] = 0;
                
// player is back
            
}
            
LastPos[i][0] = x;
            
LastPos[i][1] = y;
            
LastPos[i][2] = z;
        }
    }
    return 
1;

Reply


Messages In This Thread
Issue with loop - by Tass007 - 28.08.2016, 09:43
Re: Issue with loop - by jlalt - 28.08.2016, 09:50
Re: Issue with loop - by Threshold - 28.08.2016, 13:21
Re: Issue with loop - by Tass007 - 29.08.2016, 01:26
Re: Issue with loop - by Jefff - 29.08.2016, 01:57
Re: Issue with loop - by Threshold - 29.08.2016, 02:28
Re: Issue with loop - by Tass007 - 29.08.2016, 03:05
Re: Issue with loop - by Threshold - 29.08.2016, 06:33
Re: Issue with loop - by Jefff - 29.08.2016, 14:52
Re: Issue with loop - by Tass007 - 01.09.2016, 11:47

Forum Jump:


Users browsing this thread: 1 Guest(s)