12.03.2012, 19:24
using it in a command would require you to ;
save the pos of the veh,
remove the player from it
set the plate
respawn the veh
move the veh to the saved pos
put player back in the car.
for static ones try..
this code works fine in OnGameModeInit()
you should not be setting the plate in OnVehicleSpawn()
it needs to happen before this callback from what iv read..
save the pos of the veh,
remove the player from it
set the plate
respawn the veh
move the veh to the saved pos
put player back in the car.
for static ones try..
pawn Код:
new numplate_test[11],vid;
vid = AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2,(15*60)); // respawn 15 minutes
format(numplate_test,10,"LV-{%d}",vid);
SetVehicleNumberPlate(vid, numplate_test);
//next AddStaticVehicle ......
vid = AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2,(15*60)); // respawn 15 minutes
format(numplate_test,10,"LV-{%d}",vid);
SetVehicleNumberPlate(vid, numplate_test);
you should not be setting the plate in OnVehicleSpawn()
it needs to happen before this callback from what iv read..