Race position
#8

PHP код:
stock GetPlayerRacePosition(playerid)
{
    new 
count,  cp gCheckpoint[playerid];
    foreach(new 
Player)
    {
        if(
gCheckpoint[i] > gCheckpoint[playerid])
        {
            
count ++;
        }
        else if (
gCheckpoint[i] == gCheckpoint[playerid])
        {
            if (
GetPlayerDistanceFromPoint(ig_arrCheckpoints[0][cp], g_arrCheckpoints[1][cp], g_arrCheckpoints[2][cp]) < GetPlayerDistanceFromPoint(playeridg_arrCheckpoints[0][cp], g_arrCheckpoints[1][cp], g_arrCheckpoints[2][cp]))
            {
                
count ++;
            }
        else if(
gCheckpoint[i] < gCheckpoint[playerid])
        {
            
count --;
        }
        }
    }
    return 
count 1;

Reply


Messages In This Thread
Race position - by JaKe Elite - 07.12.2016, 12:36
Re: Race position - by Konstantinos - 07.12.2016, 12:46
Re: Race position - by JaKe Elite - 07.12.2016, 13:04
Re: Race position - by Yaa - 07.12.2016, 13:07
Re: Race position - by Konstantinos - 07.12.2016, 13:18
Re: Race position - by JaKe Elite - 07.12.2016, 13:24
Re: Race position - by JaKe Elite - 07.12.2016, 13:38
Re: Race position - by Yaa - 07.12.2016, 13:45
Re: Race position - by Konstantinos - 07.12.2016, 13:45
Re: Race position - by gurmani11 - 07.12.2016, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)