it is possible ???
#8

Let's use OnPlayerUpdate as an example, as it's called LOTS of times each second.

OnPlayerUpdate:
pawn Код:
public OnPlayerUpdate(playerid)
{
    if( IsPlayerInRangeOfPoint( playerid, 40.0, 0.0, 0.0, 0.0 )) //40.0 is the range, and the 3x 0.0 is the coords
        SetPlayerCheckpoint( playerid, 0.0, 0.0, 0.0, 1.5 )) //Again, 0.0 = coords, and 1.5 is the size if the cp (if you don't know that already)
    else if( IsPlayerInRangeOfPoint( playerid, 40.0, 1.0, 1.0, 1.0 )) //other location
        SetPlayerCheckpoint( playerid, 1.0, 1.0, 1.0, 1.5 )) //checkpoint
    //continue if more checkpoints ...

    return true;
}
Remember that the coords used in the IsPlayerInRangeOfPoint function should be equal to the checkpoint's coords.

OnPlayerEnterCheckpoint:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if( IsPlayerInRangeOfPoint( playerid, 1.5, 0.0, 0.0, 0.0 )) //Range shouldn't be much more than the size of the checkpoint, but it doesn't matter too much. Just remember to keep it around the same as size
    {
        //Do stuff you want, when player enters checkpoint
    }
    else if( IsPlayerInRangeOfPoint( playerid, 1.5, 1.0, 1.0, 1.0 )) //other cp
    {
        //Do other stuff
    }
    return true;
}
That's how I do it.
But remember: If you're going to use alot of checkpoints, I recommend using a streamer, as it's probably faster and better.
Reply


Messages In This Thread
it is possible ??? - by [Lsrcr]Rafa - 08.09.2010, 14:39
Re: it is possible ??? - by Nero_3D - 08.09.2010, 15:11
Re: it is possible ??? - by [Lsrcr]Rafa - 08.09.2010, 15:40
Re: it is possible ??? - by LarzI - 08.09.2010, 15:44
Re: it is possible ??? - by [Lsrcr]Rafa - 08.09.2010, 15:52
Re: it is possible ??? - by LarzI - 08.09.2010, 15:57
Re: it is possible ??? - by [Lsrcr]Rafa - 08.09.2010, 16:00
Re: it is possible ??? - by LarzI - 08.09.2010, 16:12
Re: it is possible ??? - by [Lsrcr]Rafa - 08.09.2010, 16:22
Re: it is possible ??? - by LarzI - 08.09.2010, 16:26

Forum Jump:


Users browsing this thread: 1 Guest(s)