Does not loading the cfg
#1

Hy!

I have a little problem, imitated LARP mod, the /v system it RP my rp mod ,there is not warning, but the server not load in the cars.cfg -t, all other cfg-t fills, what may be the problem?
Reply
#2

Can you type that again in a way we can understand? Have you scripted the codes and stuff to read from cars.cfg?
Reply
#3

Sorry,but I do not know a lot in English,but the Hungarians cannot help :S

Quote:
Originally Posted by kyoto
Посмотреть сообщение
forward LoadCar();
OnGameModeInit: LoadCar();

public LoadCar()
{
new arrCoords[13][64];
new strFromFile2[256];
new File: file = fopen("cars.cfg", io_read);
if (file)
{
new idx = 184;
while (idx < sizeof(CarInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
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], 0, strlen(arrCoords[7]), 255);
strmid(CarInfo[idx][cDescription], arrCoords[8], 0, strlen(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;
}

public SaveCarCoords()
{
new idx;
new File: file2;
while (idx < sizeof(CarInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d|%f|%f|%f|%f|%d|%d\n",
CarInfo[idx][cModel],
CarInfo[idx][cLocationx],
CarInfo[idx][cLocationy],
CarInfo[idx][cLocationz],
CarIcnfo[idx][cAngle],
CarInfo[idx][cColorOne],
CarInfo[idx][cColorTwo]);
if(idx == 0)
{
file2 = fopen("cars.cfg", io_write);
}
else
{
file2 = fopen("cars.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}
Reply
#4

mmmm... try getting a new .cfg's
then retype evrything again
Reply
#5

WRONG section!
Reply
#6

http://forum.sa-mp.com/forumdisplay.php?f=12

Reply
#7

Quote:
Originally Posted by SkizzoTrick
Посмотреть сообщение
or since he wants the hungarians to help him
http://forum.sa-mp.com/forumdisplay.php?f=47
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)