Car spawner and money bag bug
#5

You can make a loop to check how many cars you have on server then random that value, something like this:
Код:
new cars;
for(new i=0;i<MAX_VEHICLES;i++)
{
    if(!IsValidVehicle(i)) //Check if the vehicle is not created.
    {
        cars = i-1; //It stores the last created vehicle ID;
        break;
    }
}
new SpawnVeh = random(cars); //It selects a random car.
And about Moneybag answer my question,When is the pickup "MoneyBagPickup" created?
Reply


Messages In This Thread
Car spawner and money bag bug - by 1fret - 25.09.2015, 16:43
Re: Car spawner and money bag bug - by Aly - 25.09.2015, 17:05
Re: Car spawner and money bag bug - by Vince123 - 25.09.2015, 17:06
Re: Car spawner and money bag bug - by 1fret - 25.09.2015, 17:49
Re: Car spawner and money bag bug - by Aly - 25.09.2015, 17:55
Re: Car spawner and money bag bug - by 1fret - 25.09.2015, 18:12
Re: Car spawner and money bag bug - by Aly - 25.09.2015, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)