SA-MP Forums Archive
License Plate - 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: License Plate (/showthread.php?tid=196308)



License Plate - Jikesh - 05.12.2010

Any idea how to add same license plate to all vehicles in the server.. easily?


Re: License Plate - Zimon95 - 05.12.2010

pawn Код:
for(new i = 1; i < MAX_VEHICLES; i++)
{
    SetVehicleNumberPlate(i, "PLATE");
}



Re: License Plate - piohh - 05.12.2010

or like this...

new admhouse1

admhouse1 = AddStaticVehicleEx(562,-2528.8894,2269.0024,4.7100,245.0000,6,6,-1); SetVehicleNumberPlate(admhouse1, "LS-A659");

I do this with 500 Cars ^^
then all Cars have different Numbers


Re: License Plate - Jochemd - 05.12.2010

Quote:
Originally Posted by piohh
Посмотреть сообщение
or like this...

new admhouse1

admhouse1 = AddStaticVehicleEx(562,-2528.8894,2269.0024,4.7100,245.0000,6,6,-1); SetVehicleNumberPlate(admhouse1, "LS-A659");

I do this with 500 Cars ^^
then all Cars have different Numbers
Then you're doing slowly shit.

pawn Код:
for(new v = 0; v < MAX_PLAYERS; v ++)
{
    SetVehicleNumberPlate(vehicleid,"Number");
}



Re: License Plate - piohh - 05.12.2010

Thats the same work but if you work only with a ID u have some more work if you change other things with cars


Re: License Plate - [NWA]Hannes - 05.12.2010

Quote:
Originally Posted by piohh
Посмотреть сообщение
Thats the same work but if you work only with a ID u have some more work if you change other things with cars
I think your system is great, but you could also do it like this:
new admhouse1;
admhouse1 = AddStaticVehicleEx(562,-2528.8894,2269.0024,4.7100,245.0000,6,6,-1);
new npl[10];
format(npl, 10, "LS-A %d", admhouse1);
SetVehicleNumberPlate(admhouse1, npl);

So they get a unique id


Re: License Plate - StreetGT - 05.12.2010

Quote:
Originally Posted by piohh
Посмотреть сообщение
or like this...

new admhouse1

admhouse1 = AddStaticVehicleEx(562,-2528.8894,2269.0024,4.7100,245.0000,6,6,-1); SetVehicleNumberPlate(admhouse1, "LS-A659");

I do this with 500 Cars ^^
then all Cars have different Numbers
I made the same


Re: License Plate - gimini - 05.12.2010

Quote:
Originally Posted by piohh
Посмотреть сообщение
or like this...

new admhouse1

admhouse1 = AddStaticVehicleEx(562,-2528.8894,2269.0024,4.7100,245.0000,6,6,-1); SetVehicleNumberPlate(admhouse1, "LS-A659");

I do this with 500 Cars ^^
then all Cars have different Numbers
I think it's bad idea

Код:
new buffer[20];
for(new v = 0; v < MAX_VEHICLES; v++)
{
format(buffer, sizeof(buffer), "LS-A%d%d", v, random(10));
SetVehicleNumberPlate(v, buffer);
}



Re: License Plate - RoamPT - 05.12.2010

Quote:
Originally Posted by piohh
Посмотреть сообщение
or like this...

new admhouse1

admhouse1 = AddStaticVehicleEx(562,-2528.8894,2269.0024,4.7100,245.0000,6,6,-1); SetVehicleNumberPlate(admhouse1, "LS-A659");

I do this with 500 Cars ^^
then all Cars have different Numbers
That works, but doing that to that ammount of cars it takes lots of time and it's a pain in the *ss.


Re: License Plate - wolfcock - 01.01.2011

Quote:
Originally Posted by gimini
Посмотреть сообщение
I think it's bad idea

Код:
new buffer[20];
for(new v = 0; v < MAX_VEHICLES; v++)
{
format(buffer, sizeof(buffer), "LS-A%d%d", v, random(10));
SetVehicleNumberPlate(v, buffer);
}
C:\Users\******\Desktop\******\gamemodes\******.pw n(6386) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.