Checkpoint for all players
#1

If I wanted to set up a marker for a race between players on my server would using SetPlayerCheckpoint show the marker for all the players?

If I then used OnPlayerEnterCheckpoint to remove the marker when the first player enters would this remove it for all the players?

I can't find anything on the wiki to confirm this. If anyone has any past experience with this, can I load these markers from a filterscript for all users, or would they all have to be done in gamemodes?

Thanks!
Reply
#2

pawn Код:
foreach(new i : Player)
{
    if(inrace[i] == 1) // Change this
    {
        SetPlayerCheckpoint(i, x, y, z); //Insert your cordinates
    }
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(inrace[playerid] == 1)
    {
        if(RaceCheckPoint[playerid] == LAST_CHECKPOINT) // Change ofcourse
        {
            foreach(new i : Player)
            {
                DisablePlayerCheckpoint(i);
            }
        }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Affan
Посмотреть сообщение
pawn Код:
foreach(new i : Player)
{
    if(inrace[i] == 1) // Change this
    {
        SetPlayerCheckpoint(i, x, y, z); //Insert your cordinates
    }
}
Great, thanks Affan. How could I add players to a race array?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)