Same car model spawning
#1

Trying to get random car models to spawn in specified locations.

pawn Код:
new arrayModels[] =
{
    400,401,405,410,492,492,412,413,415,414,419,522,492,522,421,491,491,426,424,
    414,439,458,463,467,603,600,587,581,516,517,517,491,491,492,492,522,522,474
};
Under OnGameModeInit()

pawn Код:
new randomModel = random(sizeof(arrayModels));
    AddStaticVehicle(arrayModels[randomModel],2630.1519,-1098.2321,69.1573,264.0556,-1,-1); //
    AddStaticVehicle(arrayModels[randomModel],2704.4961,-1274.4724,57.4593,319.3490,-1,-1); //
    AddStaticVehicle(arrayModels[randomModel],2750.7312,-1177.2827,69.1416,269.7911,-1,-1); //
    AddStaticVehicle(arrayModels[randomModel],2705.6379,-1178.8975,69.1017,90.4642,-1,-1); //
    AddStaticVehicle(arrayModels[randomModel],2718.1362,-1115.5847,69.2649,0.9826,-1,-1); //
        e.t.c....
I went in to test it and only the same car model is spawning for every single car...

Any way to fix this?
Reply


Messages In This Thread
Same car model spawning - by (_AcE_) - 01.08.2015, 19:52
Re: Same car model spawning - by xVIP3Rx - 01.08.2015, 19:55
Re: Same car model spawning - by Variable™ - 01.08.2015, 19:57
Re: Same car model spawning - by xVIP3Rx - 01.08.2015, 20:01
Re: Same car model spawning - by Variable™ - 01.08.2015, 20:02
Re: Same car model spawning - by (_AcE_) - 01.08.2015, 22:26

Forum Jump:


Users browsing this thread: 1 Guest(s)