SetVehicleNumberplate doesn't work?
#1

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!
Reply
#2

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.
Reply
#3

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.
Reply
#4

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

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....
}
Reply
#6

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)