22.07.2015, 19:46
Use your own id and try to match it with the car id, when you create "throwaway cars" don't increase so the next car takes it, but don't save with it unless you're restarting the server, cause it's not gonna be correct most of the times, or when you spawn a car after deleting one. like this
You'll have to do some optimization (like when a normal car is destroyed normally, somebody blow it up), but you should get my idea
pawn Код:
new carid;
//Spawn a normal car
carid ++;//should match the normal id aslong as you didn't create any throwaways
//Spawn a throwaway car
nothing, so the next car takes this id, but don't save it cause it's just when you restart/respawn a car
//restart server
use the carid as the actual id, since the trowaway cars aren't going to respawn