Bus Route
#1

pawn Код:
dcmd_work(playerid, params[])
{
    #pragma unused params
    new broute;
    new veh = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        if(veh == bus[1] || veh == bus[2] || veh == bus[3] || veh == bus[4] || veh == bus[5] || veh == bus[6] || veh == bus[7] || veh == bus[8] || veh == bus[9])
        {
            if(gTeam[playerid]==BDriver)
            {
                if(broute == 0)
                {
                    broute = 1;
                    SendClientMessage(playerid, 0xFFFFFFAA, "You have started a bus route go to the first checkpoint");
                    return 1;
                }
                else if(broute == 1)
                {
                    broute = 0;
                    SendClientMessage(playerid, 0xFFFFFFAA, "You have cancelled your bus route, you do not get paid");
                    return 1;
                }
            }
            else return SendClientMessage(playerid, 0xFF0000AA, "You need to be a bus driver");
        }
        else return SendClientMessage(playerid, 0xFF0000AA, "You need to be in a bus");
    }
    return 1;
}
public SetRaceCheckpoint(playerid,target,next)
{
   
    if(broute == 1)
    {
        SetPlayerRaceCheckpoint(playerid,0,1483.3484,-1874.7684,13.5751,1767.5543,-2169.5342,13.5753,3);
    }
    else if(broute == 1)
    {
        SetPlayerRaceCheckpoint(playerid,0,1767.5543,-2169.5342,13.5753,1825.2213,-2104.1260,13.5749,3);
    }
}
This code doesnt put any race checkpoints anywhere. I need help please?
Reply
#2

I dont see that SetRaceCheckpoint gets called

And you check twice for the same in that function
Reply
#3

can u please show me where to call SetRaceCheckpoint? i need to see my mistake in order to learn from it...
Reply
#4

I think it should be after "You have started ... ".
Reply
#5

So after that do I type SetRaceCheckpoint?
Reply
#6

Quote:
Originally Posted by wilko1995
Посмотреть сообщение
So after that do I type SetRaceCheckpoint?
Yes.

... also place DisablePlayerRaceCheckpoint() when canceling the busroute.
Reply
#7

Ok thx for the help guys and gals. =D
Reply
#8

ok now the Checkpoints work but the bus route doesnt work with more then one player, ie when someone has stopped at the stop for the timer length ith say a message but its only meant to say the message to the bus driver not every player. also any other player that isnt me gets stuck on the first checkpoint, and if i am on another checkpoint and another player goes to the first checkpoint, it sets my route to skip one stop, please help.

Code:
http://pastebin.com/jMQ9H4fr

Wilko
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)