Car plat
#1

hello
im asking if it's possibol to make the plate of every car spawned her id and how
Reply
#2

Yo. Set a bool:cars = 1; OnGameModeInit. Then make a loop with formatting vehicleid into an integer string, SetVehicleNumberPlate with that string and SetVehicleToRespawn for every car. Now set the boolean to 0. Set a condition for OnVehicleSpawn like
if(cars ==1).
Catch my drift?
Reply
#3

OnGameModeInit.

pawn Код:
new szStr[6];
for(new i=0; i < MAX_VEHICLES; ++i)
{
    format(szStr, sizeof(szStr), "%d", i);
    SetVehicleNumberPlate(i, szStr);
}
Reply
#4

Why are you doing all the work for him?
Also, you should keep in mind that a number plate only updates if a car is restreamed or respawned.
Reply
#5

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
Why are you doing all the work for him?
Also, you should keep in mind that a number plate only updates if a car is restreamed or respawned.
All the work?? It's a simple loop.

And your wrong. Numberplates update as soon as you change them. If they are already streamed in for a player, they need respawning but that can't happen under OnGameModeInit.
Reply
#6

Yes, all the work. This loop is a whole milestone for newbies.

Also, I am no RP geek. I just quoted the wiki, so I am not wrong. Blame the wiki.

https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate
Reply
#7

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
Yes, all the work. This loop is a whole milestone for newbies.[/url]
Well now he knows how to loop if he didn't before which is more help than what you posted.

You was right vehicles do need to be respawned/restreamed - if they are already streamed in. Otherwise they will be re-streamed when in view distance of a player anyway.
Reply
#8

Indeed, and this is the reason why he needs to know about that for the future.

Actually, I think both your and my posts helped him to some extent, which means that our work here is done.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)