SimplePassive: Passive Mode in your FiveM server, just like in GTA:O

Well, there is the simplepassive.changeself permission.

The commands from the client are meant to be executed in the client, because of this, the client is an untrusted context.

If you want to change the activation without the user being able to change it by themselves, use the server exports from the server!


Hey,
i turned passive mode on and everything is working except that the players aren’t invisible.
How do i fix it?
@justalemon

I’m currently checking that out right now. Ill let you know when I find the issue :3

Version 2.0.2 has been released! Here is the changelog :3

  • FIX: The alpha is now changed correctly when not using a vehicle (reported by @The_Martin on the cfx.re forums)
  • FIX: Cache the alpha value to get a bit more performance in the server

Sorry for my lack of experience, but with this new version I can’t activate and deactivate passive mode from another resource.
With the previous version I activated it from the client with:
exports.simplepassive.setActivation(source,true)
And disabled it with:
exports.simplepassive.setActivation(source,false)

Could you specify how I activate and deactivate it in this version?

That function is indeed present on code. Do you get a specific message?

is it somehow possible, that you can make yourself invisible, when you activate the command, and not other players/cars?

I can make that an extra option. Feel free to open a feature request on GitHub if you want to :slight_smile:

how do I use the keybind to turn on.

is there a way i can force passive on everyone and then they have the option to disable it with /passivetoggle ?

love this script btw!

In your server configuration, before starting SimplePassive:

setr simplepassive_default 1

1 Like

My guy! :muscle:

1 Like

can somebody help me set this up

Have you tried following the instructions in the main post?

yes I did I still don’t understand it
if you can help me or show me how to do it I’ll be helpful

You just:

  • Download the release from GitHub (click SimplePassive.zip)
  • Install it to your server with the name simplepassive (in lowercase, important)
  • If you want players to be able to change their passive mode, you add this permission line to your configuration file before starting the resource add_ace builtin.everyone simplepassive.changeself allow
  • You start the resource

no I did everything that you told me but some reason I can’t see myself go passive

Did you added the permission? It’s required to be able to change your passive mode activation.

yeah I’m pretty sure I did

I dont know much about fivem developing can you help me with export ? @ justalemon

RegisterNetEvent("vntr-racing:joinedRace")
AddEventHandler("vntr-racing:joinedRace", function(race)
    race.start.pos = tableToVector3(race.start.pos)
    spawnCheckpointObjects(race.start, config.startObjectHash)
    exports.simplepassive:setActivation(true)
end)

did i do it right ?