13.08.2012, 13:20
I know I'm not the only one who has this problem.
I'm the owner of a stunting server, and I have a big problem.
For example, ID 0 types /v NRG. So a NRG-500 spawns...
I allocate the vehicleid to a per player variable
Lets say that NRG is vehicleid 200.
So that means there are 200 vehicles in the server.
Now ID 1 types /v infernus. So an infernus spawns.
So now I will again allocate the vehicle id to a per player variable.
This infernus will be vehicleid 201.
Now we have 201 vehicles in the server.
Now the NRG of ID 0 gets destroyed, and I delete the vehicle for ever.
So now we have 200 vehicles in the server.
ID 3 types /v turismo.
And again I will allocate the vehicleid to the per player variable.
So now there are 201 vehicles in the server and ID's 3 per player variable will be 201.
So now ID 1 and ID 3 have the same vehicleid in the per player variable...
If I do DestroyVehicle(PlayerCar[3]) <- Destroying vehicle ID 201, thats allocated from playerid 3.
It will destroy the vehicle from playerid 1.
I don't know how to fix this!
I know the problem, as explained, but I have no idea on how to fix it. (actually I do, do a loop)
I'm the owner of a stunting server, and I have a big problem.
For example, ID 0 types /v NRG. So a NRG-500 spawns...
I allocate the vehicleid to a per player variable
Lets say that NRG is vehicleid 200.
So that means there are 200 vehicles in the server.
Now ID 1 types /v infernus. So an infernus spawns.
So now I will again allocate the vehicle id to a per player variable.
This infernus will be vehicleid 201.
Now we have 201 vehicles in the server.
Now the NRG of ID 0 gets destroyed, and I delete the vehicle for ever.
So now we have 200 vehicles in the server.
ID 3 types /v turismo.
And again I will allocate the vehicleid to the per player variable.
So now there are 201 vehicles in the server and ID's 3 per player variable will be 201.
So now ID 1 and ID 3 have the same vehicleid in the per player variable...
If I do DestroyVehicle(PlayerCar[3]) <- Destroying vehicle ID 201, thats allocated from playerid 3.
It will destroy the vehicle from playerid 1.
I don't know how to fix this!
I know the problem, as explained, but I have no idea on how to fix it. (actually I do, do a loop)