License Plate
#1

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

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

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

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");
}
Reply
#5

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

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

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
Reply
#8

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);
}
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 5 Guest(s)