SetVehicleNumberPlate
#1

I've a problem with SetVehicleNumberPlate, It's not loading it into the server even more then that:

I've this under OnGameModeInIt:
Код:
	LoadStaticVehicles();
	LoadFactions();
	LoadFamilies();
	LoadPickups();
	LoadPoints();
	LoadBiz();
	LoadHouses();
	LoadDoors();
	LoadGates();
	LoadMapIcons();
	LoadArrestPoint();
	LoadDrugs();
	LoadProducts();
	LoadPlates();
	LoadMOTDS();
The problem is, it's stuck the load, when it's arrive LoadPlates it won't load it and it won't LoadMotds either.

Here's the stock:
Код:
stock LoadPlates()
{
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
            if(IsCopVehicle(i)) SetVehicleNumberPlate(i, "LSPD");
        	else if(IsMedicVehicle(i)) SetVehicleNumberPlate(i, "LSEMS");
            else if(IsGuardVehicle(i)) SetVehicleNumberPlate(i, "SADOC;");
            else if(IsCIUVehicle(i)) SetVehicleNumberPlate(i, "random(899999) + 100000");
            else if(IsNewsVehicle(i)) SetVehicleNumberPlate(i, "SAN");
            else if(IsGovVehicle(i)) SetVehicleNumberPlate(i, "LSGOV");
            else if(IsSheriffVehicle(i)) SetVehicleNumberPlate(i, "SASD");
            else if(IsDMVCar(i)) SetVehicleNumberPlate(i, "SADMV");
            else if(IsRentalCar(i)) SetVehicleNumberPlate(i, "RENTAL");
			else if(IsTruckerVehicle(i)) SetVehicleNumberPlate( i, "TRUCKER");
    }
    print("Plates sucessfully loaded.");
    return 1;
}
Reply
#2

Quote:

Note: The vehicle must be respawned or restreamed for the changes to take effect.

There we go, try SetVehicleToRespawn(i); at the end of the for loop.
Reply
#3

Not works, the problem is it's even not loading it, it's loading up to Products and LoadPlates stopping it, if I'm removing LoadPlates it will load Motds either.
Reply
#4

What is the problem
Reply
#5

The 'LoadPlates' OnGameModeInIt stops the loading and the rest it's just not loading. It's like a block.
Reply
#6

PHP код:
stock LoadPlates()
{
    for(new 
0MAX_VEHICLESi++)
    {
            if(
IsCopVehicle(i)) SetVehicleNumberPlate(i"LSPD");
            else if(
IsMedicVehicle(i)) SetVehicleNumberPlate(i"LSEMS");
            else if(
IsGuardVehicle(i)) SetVehicleNumberPlate(i"SADOC;");
            else if(
IsCIUVehicle(i)) SetVehicleNumberPlate(i"random(899999) + 100000");
            else if(
IsNewsVehicle(i)) SetVehicleNumberPlate(i"SAN");
            else if(
IsGovVehicle(i)) SetVehicleNumberPlate(i"LSGOV");
            else if(
IsSheriffVehicle(i)) SetVehicleNumberPlate(i"SASD");
            else if(
IsDMVCar(i)) SetVehicleNumberPlate(i"SADMV");
            else if(
IsRentalCar(i)) SetVehicleNumberPlate(i"RENTAL");
            else if(
IsTruckerVehicle(i)) SetVehicleNumberPlatei"TRUCKER");
    }
    print(
"Plates sucessfully loaded.");

try this
Reply
#7

Get the crashdetect plugin and see what error you get when LoadPlates happens.
Reply
#8

Not works
Reply
#9

You can do like I did!
Set all the License plates manually on more than 300 cars
Reply
#10

Quote:
Originally Posted by goviscrap
Посмотреть сообщение
You can do like I did!
Set all the License plates manually on more than 300 cars
How you did? send me a code please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)