Jump to content

[RESOLVED] Manipulate AI


Jesyx

Recommended Posts

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

Edited by Jesyx
RESOLVED

🇨🇦🇳🇱🇺🇦 Слава Україні! 🇺🇦🇳🇱🇨🇦

🇨🇦🇳🇱🇺🇦 Героям слава! 🇺🇦🇳🇱🇨🇦

Link to comment
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.

 

See:

http://www.dev-c.com/nativedb/func/info/c12321827687fe4d

 

Further reading:

 

 

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

🇨🇦🇳🇱🇺🇦 Слава Україні! 🇺🇦🇳🇱🇨🇦

🇨🇦🇳🇱🇺🇦 Героям слава! 🇺🇦🇳🇱🇨🇦

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...