Making a race starter
#3

You should check if they are in the race before the loop. Because if they are, it will just freeze them and put them at the race but not put them in a vehicle. And you probably want to use CreateVehicle instead because AddStaticVehicle's cannot be removed from the game. An alternative way could be like this though.

pawn Код:
//Top
new RaceVehicles[12];
new SeatPos;

//GameModeInit
RaceVehicles[0] = CreateVehicle(506,564.58,-2395,5.8318,360,0,1,9999);
RaceVehicles[1] = CreateVehicle(506,564.58,-2382,5.8317,360,0,1,9999);
RaceVehicles[2] = //And so on

if(strcmp(cmdtext, "/join", true) == 0)
{
   //No need to set their position if you're gonna put them in the vehicle anyway
   TogglePlayerControllable(playerid,0);
   PutPlayerInVehicle(RaceVehicles[SeatPos]);
   SeatPosition++;
   return 1;
}

//And when the race is over, set SeatPos to 0
Reply


Messages In This Thread
Making a race starter - by Enzo_Ferrari_V12 - 28.04.2009, 00:36
Re: Making a race starter - by StrickenKid - 28.04.2009, 01:33
Re: Making a race starter - by Backwardsman97 - 28.04.2009, 02:59

Forum Jump:


Users browsing this thread: 2 Guest(s)