[SOLVED] /quit command to disconnect from the server

is that possible to make a script that you type something like /quit or whatever and disconnect from the server to FiveM Main Menu?

(I am sorry if that’s not a good topic, I started the development of my server 5 days ago)

On the server, there is a DropPlayer function… Call that.


1 Like

thank you my friend =D

1 Like

i am confused about the script of this in lua, but it really helps, thank you so much

@Havoc ive tried a lot of different ways, but is not working. can you help me please?



You have 3 arguments, source, name and message meanwhile when you trigger the event you don’t pass any of them…
So what is the sense ;D?

Now you have the function to drop a player, but you need an event to trigger that.
If you want to understand how everything works together, the best practice is to read and UNDERSTAND script people have done in release forum.

understood, thank you for the help :slight_smile:

finally is working!!! but we simplified the code a lot…


thank you all guys

well, when the user type /quit he disconnect, but for the rest of the players in the server, the player still there, visually, and also in the scoreboard with the id and all

Keep in mind, you often have to restart your client to ensure stability with FiveM. So, its probably easier to close out the game and restart it, rather than /quit.

1 Like