Can potential attackers(clients) tamper with existing AI in the server?

Hey everyone. I have been reading up on a lot of bogus things players can do. I am currently making a server and a big part of it is having the streets filled with AI and not having a ghost town. So I was wondering, if clients can do any damage with them being around? If so, what are some steps I can take to protect myself?

I saw some thread a person made about not allowing players to spawn their own vehicles, but people in the comments said that removed all the AI vehicles all together IIRC. That isn’t really an option for me.

Hi.

First off, is your server ESX? & What are you trying to protect?

  • If you are worried about players mass spawning cars and spamming the server with loads of tugs or planes, ect.

I recommend not letting players spawn tugs or planes, instead only make it so players you trust can do that: Discord Vehicle Whitelist - by FAXES

  • If your server is ESX and you don’t want people giving themselfs money:

Then you should get an anticheat, like: Anticheese Anticheat. It also helps to change scripts(if you’re using esx) to this: https://forum.cfx.re/t/release-bug-fix-esx-scripts-and-some-server-suggestions/202059

  • Deny User Menus

While this one is your servers choice, putting this in your server.cfg:

sv_scriptHookAllowed 0

Will mean you have control over what menus players can use. (while they can still inject menus in, thats why you have an anticheat, and having a good one will detect & stop that.)

If you do Deny that, then you should get vMenu, it’s a great menu with tons of features.

  • Hope this helped, lmk if you got any questions.

Check population types if you’re using entityCreated, or use the ‘entity lockdown’ mode if you write your own scripts and don’t rely on CreateVehicle client-side.

I am trying to make a custom server, mostly from scratch but with some sort of an economy. I think what you posted will help me a lot, just reading through the resources and looking what people are doing. Thank you very much!

Could you please elaborate on this? I just checked in the documentation about population type, it doesn’t say anything except that the function for type, returns an int. As for entity lockdown mode, do you mean I would have to make my own AI scripts?

Sorry for being question intensive. But I am new here and there seems to be a lot to cover. Thanks for helping me out!

The enumeration is specified in the client-side native; the server one returns the same values.

Only if set to ‘strict’, but you won’t be able to use any client script to create script vehicles even in ‘lax’ mode.

Oh my bad, now I see it.

Could you possibly give me a reference to this “entity lockdown” mode? I tried searching, but cannot seem to find anything on this.

Bump. Any info on the “entity lockdown” mode? Still cannot find any info on how to use this.

… use SET_SYNC_ENTITY_LOCKDOWN_MODE?

Thank you! I just realized yesterday that I have the ability to look at the source code, makes things a bit easier.