SA-MP Forums Archive
[Help] SetVehicleNumberPlate - 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: [Help] SetVehicleNumberPlate (/showthread.php?tid=200615)



[Help] SetVehicleNumberPlate - Deathwing - 18.12.2010

Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
	new vehicleid;
	if(IsAnOwnableCar(vehicleid))
	{
 	if(CarInfo[vehicleid][cOwned]==1)
  	{
	new vehicleid;
 	SetVehicleNumberPlate(IsAnOwnableCar(vehicleid), CarInfo[vehicleid][cOwner]);
 	}
 	}
    return 1;
}
what's wrong ? in game is showed the classic numberplate xyzr 000 or something like that.
pls help


Re: [Help] SetVehicleNumberPlate - kurta999 - 18.12.2010

You must respawn car after SetVehicleNumberPlate.


Re: [Help] SetVehicleNumberPlate - Zamaroht - 18.12.2010

There is no need to use the function in OnVehicleStreamIn. You can use it right after the CreateVehicle function, once, and it will work as expected.


Re: [Help] SetVehicleNumberPlate - Deathwing - 18.12.2010

i made it work . thx for help
Код:
	for(new h = 184; h < sizeof(CarInfo); h++)
	{
		SetVehicleNumberPlate(AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000), CarInfo[h][cOwner]);
	}
i posted the code for the other people who don't know how to do it !