[SOLVED] /quit command to disconnect from the server


#1

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)


#2

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


#3

thank you my friend =D


#4

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


#5

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

client

server


#6

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?


#7

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.


#8

understood, thank you for the help :slight_smile:


#9

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

server

thank you all guys


#10

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


#11

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.