SA-MP Forums Archive
Need some help - 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)
+--- Thread: Need some help (/showthread.php?tid=343654)



Need some help - zombieking - 18.05.2012

At First , Hello All! So here is my problem:

I have Cars.cfg in scriptfiles/cars.cfg , and I have my cars there , the cars load from that file but the problem is that there are 137 total cars but only 78 laod correctly and appear, the rest does not appear in the game. Any help will be appreciated and will give +REP.

Thanks in advance!


Re: Need some help - Flake. - 18.05.2012

load it like this

pawn Код:
public OnGameModeInit()
{
    new string[64]; // Create the string to store the read text in
    new File:example = fopen("cars.txt", io_read); // Open the file
    fread(example, string); // Fread from the file and store what's read in 'string'
    fclose(example); // Close the file
    printf("%s",string); // Print what was read
    return 1;
}



Re: Need some help - zombieking - 18.05.2012

That is exactly the way it actually loads.. I'm already loading it like that!


Re: Need some help - milanosie - 18.05.2012

Check car id 79 in the file..
Might be a corrupted file with like an invalid car model/color


Re: Need some help - zombieking - 18.05.2012

Checked it.. All of them are correct..


Re: Need some help - milanosie - 18.05.2012

Quote:
Originally Posted by zombieking
Посмотреть сообщение
Checked it.. All of them are correct..
What does car ID 79 look like? In the file I mean


Re: Need some help - zombieking - 18.05.2012

It's like this:

pawn Код:
411,1658.059204,-1094.024658,23.706249,270.000000,1,1,Dealership,Infernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
411,1657.703002,-1085.105834,23.706249,270.000000,1,1,Dealership,Infernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
411,1657.813476,-1080.509887,23.698436,270.000000,1,1,Dealership,Infernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
411,1657.969726,-1089.283203,23.706249,270.000000,1,1,Dealership,Infernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0



Re: Need some help - Flake. - 18.05.2012

Quote:
Originally Posted by zombieking
Посмотреть сообщение
Checked it.. All of them are correct..
try making 2 files one for the firse 70 then another for the rest then try load both, and see what happens


Re: Need some help - milanosie - 18.05.2012

I dont get this part:

"new string[64]"

Why make a stinr gfor 150 cars only 64 bits big?


Re: Need some help - zombieking - 18.05.2012

2 files or more didn't work.. the same thing