@zee Fixed bby
Your /quit command wonât work, youâre not passing a valid player parameter. Also, thereâs no need for the client, just use server and drop the client on the server with DropPlayer, likewise with what you have done with /disconnect.
It somehow does need the client tho, for the quit command. Vespura and I discussed this above. Itâs designed to fully close FiveM, not just disconnect.
But triggering a server event which only contains DropPlayer() will only do the same as what it would do if youâre solely using the server â yes, I have tried this.
this code was used
This only dropped the client and led them back to the FiveM server list.
-- server:
RegisterNetEvent("dropSource")
AddEventHandler("dropSource", function()
DropPlayer(source, "omg")
end)
-- client:
RegisterCommand("dc", function()
TriggerServerEvent("dropSource")
end)
results in https://w.wew.wtf/htfqyd.png
The other alternative (which is what I was referencing in previous posts) would be:
-- server:
RegisterCommand("dc", function(source)
DropPlayer(source, "You have disconnected.")
end)
⌠which would have the same result as the aforementioned code.