Jump to content

[RESOLVED] Manipulate AI

Recommended Posts

How to manipulate, AI Drivers so they don't spawn or drive to a certain area?

Edited by Jesyx

Share this post

Link to post
Share on other sites
1 minute ago, liverlande said:

It seems that VEHICLE::SET_ALL_VEHICLE_GENERATORS_ACTIVE_IN_AREA should work here. I don't think RAGEPluginHook exposes it, so you'd have to directly call the native function.





Further reading:



how do you get nativedb, i tried it earlier but i couldnt figure it out

Share this post

Link to post
Share on other sites

nativedb is just the name of the web resource. Native functions are functions used by GTA V, which can also be called through an external modification such as RAGEPluginHook. You can use NativeFunction.CallByName to call a native by name, or you can use NativeFunctions.Natives.NameOfFunction if RAGEPluginHook has it coded in. Both achieve the same, you could also call by hash and a few other things but that's beyond the scope of this post.


From the "further reading" example I have provided, this example is given by epicmrjuan. You'd need to adjust the supplied parameters, according to the definition on nativedb:

NativeFunction.Natives.SET_ALL_VEHICLE_GENERATORS_ACTIVE_IN_AREA(474.19f,  565.63f, 185.40f, 986.80f, 617.79f, 100.00f, false, false);


Edited by liverlande

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now