Doubt with a checkpoint thing
#4

pawn Код:
public OnGameModeInit()
{
    SetTimer("AreaCheck", 1000, 1);
    return 0;
}

forward AreaCheck();
public AreaCheck()
{
    for (new playerid = 0, max = GetMaxPlayers(); playerid < m; playerid++)
    {
        if (IsPlayerConnected(playerid))
        {
            if (IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
            {
                SetPlayerCheckpoint(playerid, x, y, z, 3.0);
            }
            else //lets disable it if he's to far away
            {
                DisablePlayerCheckpoint(playerid);
            }
        }
    }
}
Note that this will only work if this checkpoint is the only one on your server
Reply


Messages In This Thread
Doubt with a checkpoint thing - by RoamPT - 05.04.2010, 20:26
Re: Doubt with a checkpoint thing - by dice7 - 05.04.2010, 20:28
Re: Doubt with a checkpoint thing - by RoamPT - 06.04.2010, 19:24
Re: Doubt with a checkpoint thing - by dice7 - 06.04.2010, 19:29
Re: Doubt with a checkpoint thing - by RoamPT - 06.04.2010, 19:39

Forum Jump:


Users browsing this thread: 2 Guest(s)