Owned Vehicle System.
#1

Hi, So while creating my system, I finished,

http://pastebin.com/0iVzLA8t

The Problem is, In the log file, It gives around 100+ logs with empty %i etc, and in game, it doesn't spawn any vehicle, If i remove ! from line 53, It only gives timelog, Which is from the log stock, So it doesn't respond then, Neither do the cars come, Here's the 1.ini from vehicles folder.
http://pastebin.com/p09SzDvS
Reply
#2

Bump
Reply
#3

Update: I counted the log files, And it came up with 250 lines of this repeating:
PHP код:
[08:44:00Spawning Owned Vehicle IDOwner:  | X0.000000 Y0.000000 Z0.000000 
Reply
#4

It appears that it is spawning the vehicle at X=0, Y=0, Z=0, which is why you don't see it. Are you sure you are saving/loading the position correctly?
Reply
#5

The position isn't important now, It's something with the load system, Since it loads 250 files that doesn't exist, There's only 1.ini, which is mine, But the information doesn't load.
Reply
#6

So what is the issue? You say that the cars don't spawn, yet it seems they do spawn at (0,0,0).
Reply
#7

This is the problem:
* The car(s) don't spawn when the owner logs in.
* In the log file, When ever someone logs in, It gives 250 log lines as I said above.
Reply
#8

I think Problem is in this statement But I'm not sure.
Look like when any budy login even his name didn't match with ovOwner name it will get inside that statement.
Because he have no vehicle no x y z it spawn car at 0 0 0 maybe I'm wrong.
Try to compare both strings use True or false.

if(strcmp(ov_Stats[i][ovOwner], GetName(playerid),false) == 0)

When set to true, the case doesn't matter - HeLLo is the same as Hello. When false, they're not the same.
http://forum.sa-mp.com/showpost.php?...34&postcount=5
Reply
#9

Okay.

Quote:
Originally Posted by Meller
Посмотреть сообщение
This is the problem:
* The car(s) don't spawn when the owner logs in.
Are you sure that, as I said before, they don't spawn at (0,0,0)?

Quote:
Originally Posted by Meller
Посмотреть сообщение
* In the log file, When ever someone logs in, It gives 250 log lines as I said above.
That's because you've defined MAX_VEHICLES_OWNED as 250. You never check if the file actually exists, so I assume it will not overwrite the currently stored data. (Position being (0,0,0))
Also, because you never check if the file exists, it will print 250 (MAX_VEHICLES_OWNED) lines containing the information of the first.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)