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)
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.
thank you my friend =D
i am confused about the script of this in lua, but it really helps, thank you so much
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.
https://wiki.fivem.net/wiki/Event:ChatMessage
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
finally is working!!! but we simplified the code a lot…
server
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.