C # How do I know when a player disconnects from the server?


#1

Hello, I have a small problem, I program a plugin in C # for my FiveM server and I would like to know if it is possible to know when a player disconnects or know if he is disconnected from the server. Do you have answers to give me? thank you in advance


#2

One magic word. Events.

You can add an event handler (like you can in Lua) to the playerDropped event.


#3

Thank you for your reply ! I’ll try this right now