freudo Posted August 27, 2017 Posted August 27, 2017 Hey, I have a problem this code working player in server. But no working when player quit. exitLobby = function(self) local previousLobby = getElementData(localPlayer, "player:selectedLobby") if previousLobby then if self.lobbies[previousLobby] then for k,v in ipairs(self.lobbies[previousLobby].players) do if v == localPlayer then table.remove(self.lobbies[previousLobby].players, k) end end end end setElementData(resourceRoot, "root:lobbies", self.lobbies) setElementData(localPlayer, "player:selectedLobby", false) exports["br_notifications"]:addNotification(localization:getText(localPlayer, "lobby-leftInRoom"), "success") end WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
Master_MTA Posted August 27, 2017 Posted August 27, 2017 3 minutes ago, barikat said: Hey, I have a problem this code working player in server. But no working when player quit. exitLobby = function(self) local previousLobby = getElementData(localPlayer, "player:selectedLobby") if previousLobby then if self.lobbies[previousLobby] then for k,v in ipairs(self.lobbies[previousLobby].players) do if v == localPlayer then table.remove(self.lobbies[previousLobby].players, k) end end end end setElementData(resourceRoot, "root:lobbies", self.lobbies) setElementData(localPlayer, "player:selectedLobby", false) exports["br_notifications"]:addNotification(localization:getText(localPlayer, "lobby-leftInRoom"), "success") end debug? Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
freudo Posted August 27, 2017 Author Posted August 27, 2017 (edited) No have any errors. just no removing player when quit. function leav() lobbyInstance:exitLobby() end addCommandHandler("leav", leav) -- this is working function leav() lobbyInstance:exitLobby() end addEventHandler("onClientPlayerQuit", localPlayer, leav) -- no working.. Edited August 27, 2017 by barikat WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
Master_MTA Posted August 27, 2017 Posted August 27, 2017 self? undefined Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
freudo Posted August 27, 2017 Author Posted August 27, 2017 its working, just I cant show all codes. WOC-DD Destruction Derby -Level system -Clan system -Topwins -Event system for EXP -Podium with animation And more
Master_MTA Posted August 27, 2017 Posted August 27, 2017 3 minutes ago, barikat said: its working, just I cant show all codes. send pm to me Skype : 01100001 01101100 01101001 01011111 01101101 01110100 00110001 00111001 00111001 00111001 every thing is gonna be alright every thing is gonna be okay it's gonna be a good good life that's what my therapist say
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