07.02.2013, 20:26
Hm, your code seems fine, there's only one thing I can think of though:
https://sampwiki.blast.hk/wiki/Limits - as you can see here the vehicle limit is 2000 (MAX_VEHICLES)
Now - you are accessing CarSpawnerCar[NextCarSpawnerCar] - if the NextCarSpawnerCar gets over 1999 you will run into runtime error.
Oh, and this:
SetVehicleNumberPlate doesn't return a specific value, while createvehicle returns vehid.
I can't see any other issues that could cause this
Cheers
pawn Код:
NextCarSpawnerCar = NextCarSpawnerCar++;
//change to
NextCarSpawnerCar++;
Now - you are accessing CarSpawnerCar[NextCarSpawnerCar] - if the NextCarSpawnerCar gets over 1999 you will run into runtime error.
Oh, and this:
pawn Код:
CarSpawnerCar[NextCarSpawnerCar] = SetVehicleNumberPlate(CreateVehicle(492,2509.0259,-1665.4360,13.2234,35.5265,-1,-1,-1), "{00FF00}GROVE");
//change to
CarSpawnerCar[NextCarSpawnerCar] = CreateVehicle(492,2509.0259,-1665.4360,13.2234,35.5265,-1,-1,-1);
SetVehicleNumberPlate(CarSpawnerCar[NextCarSpawnerCar], "{00FF00}GROVE");
I can't see any other issues that could cause this
Cheers