Hello everyone. I looked around forum, found few similar topics but no answers were given or not exactly what i mean... so
As i know in gta sa peds and cars are following some special points, called "path nodes", i think you, Developers, know what is it and how its made.
For some reason they were removed from mta, exactly to prevent desync with traffic etc. I understand that making full traffic that will be same for each client is very hard and you got another things to do, but i wonder if it possible:
Path nodes are loaded, but no cars are spawned randomly. You can assign any created by script car to path, and then some client will handle it's physics (same as with car physics goes, closest client handle physics of cars, and if no clients around car goes freezed).
example:
bool nodeAssign ( vehicle car , int nodeid ) -- puts car onto path, returns false or true, as usual
int / table nodeGetNext ( vehicle car ) -- reads next available path node for specifed car. Returnd false if no car/car is not assigned
int nodeGetClosest ( float x , float y , float z ) -- returns id of closest node
float , float , float nodeGetPosition ( int id ) -- returns position of node with specified id
bool nodeSetNext ( vehicle car , int nodeid ) -- sets next node for car on it if car is on... emm... how's that... juction
int nodeGetCurrent ( vehicle car ) -- returnd current node of car (i guess getting car pos and then getting nearest node may be fail sometimes, as example on complicated junctions or bridges)
-- userfull but harder to make ideas
int nodeCreatePath ( table nodes ) -- crates 'path' as list of specifies nodes
bool nodePathAssign ( vehicle car ) -- assigns car to path , car will route between nodes in that path
bool carDriveTo ( vehicle car , float x , float y , float z , float speed , bool thaffic_behaviour ) -- just like similar SCM opcodes, car drives and follows path nodes
I hope it's enough understandable
sorry for my bad english)