LARP Vehicles help.
#1

When i open my 03c server with the LARP gamemode, it loads fine, and everything seems to work fine. But the ownable vehicles (from cars.cfg) do not load.

Any ideas of how i can fix this?

Thanks,
Ben
Reply
#2

Ask in the LARP gamemode topic.
Reply
#3

I got the simple answer "It says its not testing in 03c yet." or something along those lines..
Reply
#4

In your script you need to load your cars.cfg... for instance

Код:
public LoadCars()
{
    new arrCoords[5][64];
    new strFromFile2[256];
    new File: file = fopen("cars.cfg", io_read);
    if(file)
Reply
#5

Mr Despair, that is there.
PHP код:
public LoadCar()
{
    new 
arrCoords[13][64];
    new 
strFromFile2[256];
    new 
Filefile fopen("cars.cfg"io_read);
    if (
file)
    {
        new 
idx 184;
        while (
idx sizeof(CarInfo))
        {
            
fread(filestrFromFile2);
            
split(strFromFile2arrCoords',');
            
CarInfo[idx][cModel] = strval(arrCoords[0]);
            
CarInfo[idx][cLocationx] = floatstr(arrCoords[1]);
            
CarInfo[idx][cLocationy] = floatstr(arrCoords[2]);
            
CarInfo[idx][cLocationz] = floatstr(arrCoords[3]);
            
CarInfo[idx][cAngle] = floatstr(arrCoords[4]);
            
CarInfo[idx][cColorOne] = strval(arrCoords[5]);
            
CarInfo[idx][cColorTwo] = strval(arrCoords[6]);
            
strmid(CarInfo[idx][cOwner], arrCoords[7], 0strlen(arrCoords[7]), 255);
            
strmid(CarInfo[idx][cDescription], arrCoords[8], 0strlen(arrCoords[8]), 255);
            
CarInfo[idx][cValue] = strval(arrCoords[9]);
            
CarInfo[idx][cLicense] = strval(arrCoords[10]);
            
CarInfo[idx][cOwned] = strval(arrCoords[11]);
            
CarInfo[idx][cLock] = strval(arrCoords[12]);
            
printf("CarInfo: %d Owner:%s LicensePlate %s",idx,CarInfo[idx][cOwner],CarInfo[idx][cLicense]);
            
idx++;
        }
    }
    return 
1;

^ Where it is loaded.

PHP код:
    for(new 184sizeof(CarInfo); h++)
    {
        
CreateVehicle(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
    } 
^ When vehicles are added, that is below.

I haven't changed anything since downloading, i would like to add. and the problem is on both windows and linux servers....
Reply
#6

It could be the gamemode or where the file is placed or if it exists or not.
Reply
#7

I just did a bit more messing about with little bits of code and managed to fix it... There was a number wrong where it was supposed to have 'new CarInfo[268][cInfo];'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)