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

They are ACL permissions, check the FiveM documentation for information of how to use them.

I get an error at every TriggerClientEvent and on player.Handle everytime, do you know the solution? or can someone try to help me?

Hello there

Passive mode is active when you enter a field and can it be normal outside the field? @justalemon

What do you mean? If you are coding your own safe zone, make it switch by itself.

I donā€™t know much, sorry can you help me.

how to export? ur website is down. i tried to put it in checkbox menu but it does nothing.

menu_button4:On(ā€˜changeā€™, function()
print(ā€œasdā€)
exports.simplepassive:setActivation(true)
end)

it did print the asd tho so the checkbox is working fine but in F8/Console no info about passive being true

That is a server export, there are no exports on the client.

ohh. so like this?

RegisterServerEvent('qb-tp.passive')
AddEventHandler('qb-tp.passive', function()
    exports.simplepassive:setActivation(true)
end)

No wait, Iā€™m stupid. I was confusing two resources lol. Check Exports Ā· justalemon/SimplePassive Wiki Ā· GitHub for more info.

This line should work as is on the client:

exports.simplepassive:setActivation(true)

Remember that you need to give the simplepassive.changeself permission for any player that you want to authorize to use SimplePassive by themselves.

than thats the same one i send on first but didnā€™t work. i already make simplepassive allow everyone. i have no idea how this didnā€™t work

does it not show the passive activition in console or f8 when I used the export ?

You can enable debug mode to see activation/deactivation messages (setr simplepassive_debug 1).

ahhh. it works perfectly. i thought its not working as Iā€™m alone in server. now work when I ask my friend to join. thanks anyway!

I put this in a test server but when I put the disablecombat to 1 it sort-of worked.
If I went passive I couldnā€™t fire any weapons with bullets but I could still hit players with melee weapons and hand-to-hand combat. However the melee weapons only worked if I pressed R on keyboard (default hand combat key) and not using the right mouse button.
Also, having no-collision worked but other players could still kill me with weapons (firearms and melee) whether I had passive on or not.

Is this script supposed to function like this or is there a script that could be conflicting with it? The server I tested it on didnā€™t have anything that modified combat or weapons besides vMenu

Can you please file this as a bug report on GitHub? So I can fix it up later.

It would be nice a command to toggle the passive mode

::+1:

There is. Is called /passivetoggle

So I still have to give the players the permission even if I let it trigger through an export inside a script?

Only if you are triggering the events from the client. If you trigger of the event from the server, the resource thinks that you have already done all of the checks yourself and will happily change mode.