Number plate bug
#4

Quote:
Originally Posted by AndreT
Посмотреть сообщение
I don't think doing SetVehicleToRespawn in OnVehicleSpawn is a good idea. Instead you should set the vehicle's plate after you spawn the vehicle.

For example, I have around 1100 vehicle spawns and after it, I run a loop and then generate a random number plate for it.
pawn Код:
CreateVehicle(...);

new string[32];
for(new i = 0; i != MAX_VEHICLES; i++)
{
    new rand = random(3000) + 1500;
    format(string, sizeof(string), "{D20000}SC-{FFFFFF}%d", rand);
    SetVehicleNumberPlate(i, string);
    SetVehicleToRespawn(i);
}
I didn't ever say that. When you have finished adding all your static vehicles, respawn them using a loop at OnGameModeInit. Your plates will work.
Reply


Messages In This Thread
Number plate bug - by Dripac - 16.03.2012, 19:54
Re: Number plate bug - by admantis - 16.03.2012, 19:57
Re: Number plate bug - by AndreT - 16.03.2012, 20:12
Respuesta: Re: Number plate bug - by admantis - 17.03.2012, 00:41

Forum Jump:


Users browsing this thread: 1 Guest(s)