Fonction player disconected

Hello, what is the function player diconecter

For example : if “function ply disconected” then v:remove()

Thank you

Honestly, why don’t you just google such a simple question???

hook.Add( "PlayerDisconnected", "any identifier", function func )

hello, I know that but I what I want to do it is a "if Ply : disconected Then v: remove ( ) end this is for min car dealer if the player is disconnected while the car is destroyed !

if not ply then v:Remove() end

If “ply” has disconnected then his player object will no longer exists, simply run an IsValid check on him. Alternatively you can store the car/whatever needs to be removed on the player, and in the hook PlayerDisconnect loop through all his stuff and remove it.