Disable isNetwork (client sided) from server.cfg

Hey, I would like to have an option on the server.cfg to disable from the functions: CreatePed, CreateVehicle, CreateObject, CreatePedInsideVehicle, ClonePed_2, etc.. the possibility to set isNetwork to true, which means that even if it’s set to true, it will force it to be created at false argument.

With that feature, the only way to create new SYNCED vehicles is server-sided. (I still want the vehicle to be created, just not synced with the server)

Thanks for your time.

That… makes no real sense: there’s still other ways that internally create entities with network objects attached, including population and directly calling the internal functions.

If you want to prevent any abusive client-side entity creation, instead try a CancelEvent call in entityCreated when an entity is created (with script population type, if you expect NPCs to remain working) that does not seem to match what you’re trying to create from script.

CancelEvent() is not working on entityCreated, already tested that before I created this thread, and even retested it now.

Btw, population is not created via CreateVehicle and CreatePed… so it will work, I just want the isNetwork argument to be false… so even if the populations is created via CreateVehicle it will work because it is setting it to false in the resource script, and the population is being created even if there is no scripts at all…

BTW.2: I don’t really care about the NPCs so… yeah…

entityCreating* sorry, typo

What are you even trying to accomplish this way?

Now, nothing, I just didn’t knew entityCreating is exists, so I wanted to suggest a feature that does it to block it, but it can be achived with entityCreating. Thank you!

btw, where can I find all those events? the fivem documentation is very lack of informations:

There is a little problem with that event: unfortunately, GetEntityScript takes time until it works, and because of this delay it cannot be canceled… or at least give us information if the vehicle is requested from a client or from the server…

anyway, my request is still reasonable.