SA-MP Forums Archive
Vehicle Plate! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Plate! (/showthread.php?tid=529945)



Vehicle Plate! - Juvanii - 04.08.2014

Why doesn't this work?
pawn Код:
public OnGameModeInit()
{
    for(new v = 0; v < MAX_VEHICLES; v++)
    {
        SetVehicleNumberPlate(v, "JCNR");
    }
    return 1;
}



Re: Vehicle Plate! - Dignity - 04.08.2014

You need to respawn the vehicles before the plate will show.


Re: Vehicle Plate! - dirigent00 - 04.08.2014

Maybe this?
Код:
public OnGameModeInit()
{
    for(new v = 0; v < MAX_VEHICLES; v++)
    {
        SetVehicleNumberPlate(v, "JCNR");
        SetVehicleToRespawn(v);
    }
    return 1;
}



Re: Vehicle Plate! - McBan - 04.08.2014

Respawn needed.


Re: Vehicle Plate! - Juvanii - 04.08.2014

This is not Working! I have already tried to respawn the vehicles in 2 methods:
1. SetVehicleToRespawn under the loop.
2. Respawn the vehicles manually by using a cmd.

Any solution?


Re: Vehicle Plate! - dirigent00 - 04.08.2014

First, you need to create vehicle, then set his plate, and then respawn it or stream-in.


Re: Vehicle Plate! - Juvanii - 04.08.2014

why do i have to create vehicles?!! there are already so much vehicles in the server.
I'm using grandlarc vehicles. so?


Re: Vehicle Plate! - Dignity - 04.08.2014

Make sure the vehicles are loaded BEFORE you loop and set the number plates.


Re: Vehicle Plate! - Juvanii - 04.08.2014

Quote:
Originally Posted by Mionee
Посмотреть сообщение
Make sure the vehicles are loaded BEFORE you loop and set the number plates.
Thank you! it works now +Rep.
And thanks all for helping.