Truck Driver REALLY NEEDED
#3

On top of your script

pawn Код:
new TruckCheckpoint[MAX_PLAYERS];
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(IsPlayerInVehicle(playerid, 462)) //This id should be changed to your truck's model id ...
    {
    AttachTrailerToVehicle(5,1); //change the one to the id of your truck
    SetPlayerRaceCheckpoint(playerid, 0, x,y,z,nextx,nexty,nextz, 5.0);
    TruckCheckpoint[playerid] = 1;
    }

    return 1;
}
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
   DisablePlayerRaceCheckpoint(playerid);
   if(TruckCheckpoint[playerid] == 1)
   {
     SetPlayerRaceCheckpoint(playerid, 0, x,y,z, xnext,ynext,znext, 5.0);// First Checkpoint and the place to reach
     TruckCheckpoint[playerid] = 2; // NEXT CP
     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
   }
   else if(TruckCheckpoint[playerid] == 2)
   {
     SetPlayerRaceCheckpoint(playerid, 0, x,y,z, xnext,ynext,znext, 5.0);//Second checkpoint and the back where you started
     TruckCheckpoint = 3; // NEXT CP
     PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
     GivePlayerMoney(playerid,1000);
     SendClientMessage(playerid,color,"Good Job");
     }
     return 1;
   }
Not Tested yet
Reply


Messages In This Thread
Truck Driver REALLY NEEDED - by Pawel_Shark - 29.11.2008, 15:55
Re: Truck Driver REALLY NEEDED - by xaxa - 14.09.2009, 13:18
Re: Truck Driver REALLY NEEDED - by Peter_Corneile - 14.09.2009, 20:03
Re: Truck Driver REALLY NEEDED - by saiberfun - 14.09.2009, 20:08
Re: Truck Driver REALLY NEEDED - by Peter_Corneile - 14.09.2009, 20:10
Re: Truck Driver REALLY NEEDED - by emch0o - 15.09.2009, 09:44

Forum Jump:


Users browsing this thread: 1 Guest(s)