Vehicle numberplate does'nt change
#1

Vehicle numberplate does'nt change.
code:
Код:
public OnVehicleSpawn(vehicleid)
{
    SetVehicleNumberPlate(vehicleid, "ABC-123");
    SetVehicleToRespawn(vehicleid);
    return 1;
}
Can anyone help me? i don't now what i did wrong.
Reply
#2

OnVehicleSpawn is only called when the vehicle RE-spawns, not when it first spawns.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
OnVehicleSpawn is only called when the vehicle RE-spawns, not when it first spawns.
So what do i need to change?

Ik ben ook belgies, wat moet ik dan veranderen?
Reply
#4

Does anyone now it?
Reply
#5

OnGameModeInit, after you create the vehicles

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

You can set a vehicle's numberplate when it's created:

pawn Код:
new vid = CreateVehicle( ... );
SetVehicleNumberPlate(vid, "ABC123");
Reply
#7

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
OnGameModeInit, after you create the vehicles

pawn Код:
for(new i = 1; i < MAX_VEHICLES; i ++)
{
    SetVehicleNumberPlate(i, "AA 000 AA");
}
i don't understand, my code:

Код:
public OnGameModeInit()
{
    for(new i = 1; i < MAX_VEHICLES; i ++)
    {
    SetVehicleNumberPlate(i, "ABC-123");
    }
    print("Gamemode started!");
    return 1;
}
it does'nt change anything.
Reply
#8

Quote:
Originally Posted by MP2
Посмотреть сообщение
You can set a vehicle's numberplate when it's created:

pawn Код:
new vid = CreateVehicle( ... );
SetVehicleNumberPlate(vid, "ABC123");
is their not a faster way? I have 1987 vehicle's..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)