Checkpoint problems
#7

Or you can do this...

pawn Код:
//Add "CPID" to the player info enum.

//Under "OnPlayerConnect" add this line "PlayerInfo[playerid][CPID] = 0;" to reset the value.

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == DMV1 || vehicleid == DMV2 || vehicleid == DMV3)
    {
        if(PlayerInfo[playerid][DMV] == 1)
        {
            SetPlayerCheckpoint(playerid, 1427.2813, -1613.6610, 13.0077, 10.0);
            PlayerInfo[playerid][CPID] = 1;
            SendClientMessage(playerid,SYellow,"Please drive follow all the checkpoints, as you go alonge.");
            return SendClientMessage(playerid,SYellow,"the weather may change, just keep calm and drive carefully.");
        }
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    switch(PlayerInfo[playerid][CPID])
    {
        case 1:
        {
            //After the player enters the first checkpoint...
            PlayerInfo[playerid][CPID] = 2;
            SetPlayerCheckpoint(playerid, 1427.2813, -1613.6610, 13.0077, 10.0); //Show the 2nd cp
        }
        case 2:
        {
            //After the player enters the 2nd checkpoint... continue this process.
        }
    }
    return 1;
}
Reply


Messages In This Thread
Checkpoint problems - by slymatt - 25.07.2011, 01:22
Re: Checkpoint problems - by =WoR=Varth - 25.07.2011, 01:38
Re: Checkpoint problems - by slymatt - 25.07.2011, 01:39
Re: Checkpoint problems - by PotH3Ad - 25.07.2011, 01:40
Re: Checkpoint problems - by slymatt - 25.07.2011, 01:48
Re: Checkpoint problems - by =WoR=Varth - 25.07.2011, 01:50
Re: Checkpoint problems - by PotH3Ad - 25.07.2011, 02:03
Re: Checkpoint problems - by slymatt - 25.07.2011, 02:14
Re: Checkpoint problems - by slymatt - 25.07.2011, 02:26
Re: Checkpoint problems - by PotH3Ad - 25.07.2011, 02:27

Forum Jump:


Users browsing this thread: 2 Guest(s)