Problem with vehicles
#1

I have a really really big problem with my vehicles.
I create vehicles like this lspdcar[0] = CreateVehicle(...); but my next problem is that personal cars are spawning with ids like: first cars 367 , 368 ( which is good because it continues from last vehicle created in gm) and then 26,27 .. and this ids are already created by normal cars.
It's something like this:
I have 303 cars created on server, if i create a new one by command the new one goes to id 3 or 4, not 304.
How to fix this problem ?
Reply
#2

I think id 3/4 is empty car slot,so it use it,anyway try to do something like:
public OnVehicleSpawn(vehicleid)
{
VehCount++;
}
Understand the idea?
Reply
#3

Quote:
Originally Posted by Roberto80
Посмотреть сообщение
I think id 3/4 is empty car slot,so it use it,anyway try to do something like:
public OnVehicleSpawn(vehicleid)
{
VehCount++;
}
Understand the idea?
Id 3/4 it's not a slot. It's a created car under ongamemode init , thanks for your response but it isn't enough.
Anyone else?
Reply
#4

UP!!!
Reply
#5

You cannot write into running gamemode with a command. You need to make a system to save spawned cars to load them and so on.. You should use MySQL or Y-INI to save the vehicle's I'd and info or you can just download one from the web.

Michael
Reply
#6

FIXED.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)