Scriptfiles annoyance - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Scriptfiles annoyance (
/showthread.php?tid=155028)
Scriptfiles annoyance -
Antonio [G-RP] - 16.06.2010
In my scriptfiles (not MySQL yet..) i have Cars.cfg ... In my script I have a line that defines the max vehicle.
If I set that max vehicle over the amount of cars there is, the cars spawn mass amounts, and If I set below, they don't spawn at all.
Will MYSQL solve this problem?
Re: Scriptfiles annoyance -
FUNExtreme - 16.06.2010
It sounds more like a problem with your script
Re: Scriptfiles annoyance -
Antonio [G-RP] - 16.06.2010
Wrong, because it spawns the exact amount defined.
Re: Scriptfiles annoyance -
(SF)Noobanatior - 16.06.2010
can i see the code where you check the file?
Re: Scriptfiles annoyance -
Antonio [G-RP] - 16.06.2010
pawn Код:
public LoadCars()
{
new arrCoords[18][64];
new strFromFile2[256];
new File: file = fopen("/settings/cars.cfg", io_read);
if (file) {
new idx;
while (idx < sizeof(CInfo)) {
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
CInfo[idx][cParkx] = floatstr(arrCoords[0]);
CInfo[idx][cParky] = floatstr(arrCoords[1]);
CInfo[idx][cParkz] = floatstr(arrCoords[2]);
CInfo[idx][cParkr] = floatstr(arrCoords[3]);
strmid(CInfo[idx][cOwner], arrCoords[4], 0, strlen(arrCoords[4]), 255);
CInfo[idx][cCol1] = strval(arrCoords[5]);
CInfo[idx][cCol2] = strval(arrCoords[6]);
CInfo[idx][cMod] = strval(arrCoords[7]);
CInfo[idx][cValue] = strval(arrCoords[8]);
CInfo[idx][cBought] = strval(arrCoords[9]);
strmid(CInfo[idx][cName], arrCoords[10], 0, strlen(arrCoords[10]), 255);
CInfo[idx][cLevel] = strval(arrCoords[11]);
CInfo[idx][cAlarm] = strval(arrCoords[12]);
CInfo[idx][cLaser] = strval(arrCoords[13]);
CInfo[idx][cGPS] = strval(arrCoords[14]);
CInfo[idx][cLock] = strval(arrCoords[15]);
CInfo[idx][cNew] = strval(arrCoords[16]);
CInfo[idx][cLocked] = strval(arrCoords[17]);
//strmid(CInfo[idx], arrCoords[17], 0, strlen(arrCoords[17]), 255);
idx++;
}
}
fclose(file);
return 1;
}
Re: Scriptfiles annoyance -
(SF)Noobanatior - 16.06.2010
that looks all good what about the code when you create the cars
Re: Scriptfiles annoyance -
Antonio [G-RP] - 16.06.2010
Код:
CreateVehicle(CInfo[c][cMod], CInfo[c][cParkx], CInfo[c][cParky], CInfo[c][cParkz], CInfo[c][cParkr], CInfo[c][cCol1], CInfo[c][cCol2], never);