SetVehicleNumberPlate problem
#1

I use an edit of gtarp and i want to have numberplates on all ownablecars.
I tried
Код:
for(new h = 197; h < sizeof(CarInfo); h++)
	{
		SetVehicleNumberPlate(h, CarInfo[h][cLicense]);
	}
But it doesn't work.
Reply
#2

where u put this code? what callback?
Reply
#3

Try this: After setting the numberplate, respawn cars!
So the code will look like this:

pawn Код:
for(new h = 197; h < sizeof(CarInfo); h++)
{
    SetVehicleNumberPlate(h, CarInfo[h][cLicense]);
    SetVehicleToRespawn(h);
}
And I have an tip. If you use an 'for' thing, or an 'if' statement etc, and it has just one line, don't use brackets.
Example:

pawn Код:
for(new h = 197; h < sizeof(CarInfo); h++)
    SetVehicleNumberPlate(h, CarInfo[h][cLicense]);
Reply
#4

It still doesn't work. I write in the cfg file a number and when i start the server the text that i wrote disappears.
Reply
#5

And did you update the 'read from cfg' function (idk how it's called in GtaRP)? Just editting cfg won't work :')
Reply
#6

LoadCar. It's already defined cLicense.
Reply
#7

Oh then I don't know.
Ask the creator of GtaRP for help. He/She will probbaly know it.
Reply
#8

put this after:
OnGameModeInit or OnVehicleSpawn
pawn Код:
for(new h = 197; h < sizeof(CarInfo); h++)
{
    SetVehicleNumberPlate(h, CarInfo[h][cLicense]);
    SetVehicleToRespawn(h);
}
Reply
#9

@SkizzoTrick:
Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Try this: After setting the numberplate, respawn cars!
So the code will look like this:

pawn Код:
for(new h = 197; h < sizeof(CarInfo); h++)
{
    SetVehicleNumberPlate(h, CarInfo[h][cLicense]);
    SetVehicleToRespawn(h);
}
And I have an tip. If you use an 'for' thing, or an 'if' statement etc, and it has just one line, don't use brackets.
Example:

pawn Код:
for(new h = 197; h < sizeof(CarInfo); h++)
    SetVehicleNumberPlate(h, CarInfo[h][cLicense]);
Please, read the whole topic first.
Reply
#10

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
@SkizzoTrick:

Please, read the whole topic first.
Ohh ...that posts wasn't there before my answer ,ffs,maybe my internet is low,im gonna restart the PC,sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)