[N]inja Posted August 20, 2020 Share Posted August 20, 2020 (edited) i wanted to give /quit for a click on the panel but I'm not finding any way or function to do this Edited August 20, 2020 by [N]inja Link to comment
SpecT Posted August 20, 2020 Share Posted August 20, 2020 AFAIK you can't close client's game with a script. The only way is the client to do that himself (via /quit or from the game menu). Link to comment
SpecT Posted August 20, 2020 Share Posted August 20, 2020 (edited) That's what I meant in the above post - YOU CAN'T. Instead you could just kick the player from the server when the quit button is pressed. Edited August 20, 2020 by SpecT Link to comment
SpecT Posted August 21, 2020 Share Posted August 21, 2020 (edited) 20 hours ago, [N]inja said: how do I do that? Do you have any code we can help you with? We are here to help you with your scripts not write them from scratch for you. Edited August 21, 2020 by SpecT Link to comment
[N]inja Posted November 4, 2020 Author Share Posted November 4, 2020 I do not need any more Link to comment
Hydra Posted November 4, 2020 Share Posted November 4, 2020 --Client side --If you want with GUI function clickButton() if (source == button) then triggerServerEvent("leaveP", localPlayer) end end addEventHandler("onClientGUIClick", getRootElement(), clickButton) --If you want with DX function clickButton2(_,state) if isMouseInPosition(coordonates here) then if state == "down" then triggerServerEvent("leaveP", localPlayer) end end end addEventHandler("onClientClick", getRootElement(), clickButton2) --Server side function leaveP() kickPlayer(source, "asd") end addEvent("leaveP", true) addEventHandler("leaveP", root, leaveP) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now