UserAccount3 Posted October 15, 2011 Share Posted October 15, 2011 hello! i wanna know how to prevent playeer from leaving the server. i ryed this code but no work: function onLeave(player) cancelEvent() end addEventHandler("onPlayerQuit", onLeave) Link to comment
mjau Posted October 15, 2011 Share Posted October 15, 2011 Well first they can leave with quitting mta second i dont see anything wrong but onplayerquit is triggered to late i think anyway i have never tried this search a bit around herer i remeber i saw it Link to comment
UserAccount3 Posted October 15, 2011 Author Share Posted October 15, 2011 i know they can leave mta when they press the X in windows but then he must reopen mta. i wanna prevent the quit buton and quit comand. my code should works but it not, Link to comment
mjau Posted October 15, 2011 Share Posted October 15, 2011 Hm addEventHandler("onPlayerQuit", getRootElement(), function() cancelEvent() end) Dont know if this works ... Link to comment
Castillo Posted October 15, 2011 Share Posted October 15, 2011 You can't cancel this event, this would be highly stupid, why would you cancel him from quitting? you don't have enough players and you want to keep them even if they don't like the server? that's what I think. Link to comment
mjau Posted October 15, 2011 Share Posted October 15, 2011 Well and if it was possible it would get reported as abuse i guess ... Anyway instead of scripting that try to script something they like and maybe they will stay ... 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