Need some help
#1

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!
Reply
#2

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;
}
Reply
#3

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

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

Checked it.. All of them are correct..
Reply
#6

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

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
Reply
#8

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
Reply
#9

I dont get this part:

"new string[64]"

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)