SA-MP Forums Archive
SetVehicleNumberplate doesn't work? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetVehicleNumberplate doesn't work? (/showthread.php?tid=194186)



SetVehicleNumberplate doesn't work? - [MWR]Blood - 28.11.2010

Okay, so I've got this.
pawn Код:
SetVehicleNumberPlate(vehicleid,"Test"); //under onplayerentervehicle
But, for some reason, while I'm entering a vehicle the plate still remains the default(XYZR 000).
Any help would be appreciated!


Re: SetVehicleNumberplate doesn't work? - Grim_ - 28.11.2010

You need to respawn the vehicle
pawn Код:
SetVehicleToRespawn( vehicleid );
This forum requires that you wait 120 seconds between posts. Please try again in 52 seconds.


Re: SetVehicleNumberplate doesn't work? - Shadow™ - 28.11.2010

It requires you to respawn the vehicle before it changes- Here's a filterscript made for it:

https://sampforum.blast.hk/showthread.php?tid=194048

Quote:
Originally Posted by Forum
This forum requires that you wait 120 seconds between posts. Please try again in 68 seconds.



Re: SetVehicleNumberplate doesn't work? - [03]Garsino - 28.11.2010

You need to set the vehicle to respawn or go out/in of streaming range for it to update


Re: SetVehicleNumberplate doesn't work? - Stefan_Toretto - 28.11.2010

Quote:
Originally Posted by Delux13
Посмотреть сообщение
Okay, so I've got this.
pawn Код:
SetVehicleNumberPlate(vehicleid,"Test"); //under onplayerentervehicle
But, for some reason, while I'm entering a vehicle the plate still remains the default(XYZR 000).
Any help would be appreciated!
Код:
OnGameMode/FilterScriptInit
{
        rom = AddStaticVehicle(442,1780.2587,-1894.5745,13.2276,180.3468,56,1); //
	SetVehicleToRespawn(rom);
	SetVehicleNumberPlate(rom, "Romero 1");
	SetVehicleToRespawn(rom);
        // code....
}



Re: SetVehicleNumberplate doesn't work? - [MWR]Blood - 28.11.2010

Ah, didn't know that.
Thank you guys!


Re: SetVehicleNumberplate doesn't work? - Grim_ - 28.11.2010

Stefan, you don't need to respawn it right after creating it, only after setting it's license plate.

This forum requires that you wait 120 seconds between posts. Please try again in 41 seconds.