Spawn vehicle. Didn't put me inside of the vehicle.
#5

I'm not sure if this is the most efficient way of doing it, but I think when you use CreateVehicle, it assigns the highest vehicle id.
pawn Код:
for(new i=0; i<MAX_VEHICLES; i++) // Loop through all the cars.
{
    // The first invalid vehicle ID is obviously one that hasn't been made yet.
    if(i == INVALID_VEHICLE_ID)
    {
        i = CreateVehicle(blahblah); break; // so it breaks out of the loop at the highest vehicle.
    }
}
PutPlayerInVehicle(playerid, i, 0);
It also might not work if you have the 2k cars in your script.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)