20.04.2016, 14:36
You have a little mistake in there, Drivers[] shouldnt be accessed via npcid, but with the driverid.
If you have more player slots than NPCs, this will lead to an index out of bounds error.
Use GetDriverID(npcid); to get the driverid of an NPC and Drivers[driverid][nNPCID] for the other way around.
And they don't use Playback, guess they don't continue driving with the code you used in StopAttack.
Other than that nice idea If you want I can make an efficient version using the stuff I already have for the Peds.
But before that I'll add Bikes and correct rotation in all directions.
PS Checked your server, most of them are stuck at parking lots and not driving anymore. I can give you some better code for returning to the car and even stopping. Just removing them from the car will probably break them.
Also they're gathering at 0,0,0, heavy laggs going on there. Look at Driver_Init how I put them in their vehicles and so on, that should help.
If you have more player slots than NPCs, this will lead to an index out of bounds error.
Use GetDriverID(npcid); to get the driverid of an NPC and Drivers[driverid][nNPCID] for the other way around.
And they don't use Playback, guess they don't continue driving with the code you used in StopAttack.
Other than that nice idea If you want I can make an efficient version using the stuff I already have for the Peds.
But before that I'll add Bikes and correct rotation in all directions.
PS Checked your server, most of them are stuck at parking lots and not driving anymore. I can give you some better code for returning to the car and even stopping. Just removing them from the car will probably break them.
Also they're gathering at 0,0,0, heavy laggs going on there. Look at Driver_Init how I put them in their vehicles and so on, that should help.