orcun99 Posted February 14, 2018 Share Posted February 14, 2018 (edited) client side: leaveButton = guiCreateButton(0.7989,0.52,0.1721,0.05,"Çeteden Ayrıl",true,tabs[2]) ------------------------- function leaveTrigger(button, state) if button == "left" and state == "up" and source == leaveButton then if leaveClick == 0 then leaveClick = 1 outputChatBox("Gangtan çıkmak istediğine eminmisin? eminsen tekrar butona bas.", 255, 0, 0) elseif leaveClick == 1 then triggerServerEvent("_leaveGang", getLocalPlayer()) closePanel() end end end --------------------------- addEventHandler("onClientGUIClick", leaveButton, leaveTrigger, false) server side: function leaveGang() if getPlayerGang(source) then local ganginfo = getGangInfo(getPlayerGang(source)) local gangname = ganginfo['gangname'] local playerlevel = getPlayerLevel(source) if playerlevel < 5 then local dbName = "xxxgang_" .. gangname .. "_members" local accName = getAccountName(getPlayerAccount(source)) executeSQLQuery("DELETE FROM ? WHERE `accountname`=?", dbName, accName) setAccountData(getPlayerAccount(source), "gang", false) setElementData(source, "gang", false) exports.xxxcommands:sendMessage(getPlayerName(source) .. " çeteden çıktı " .. gangname .. ".", 255, 255, 0, root) else triggerClientEvent(source, "errorDisplay", source, "Hata: çıkmadan önce başkanlığı devret.") end end end addEvent("_leaveGang", true) addEventHandler("_leaveGang", getRootElement(), leaveGang) when someone leaves the gang do not open again gangpanel but he still in gang he's going bug sorry for bad england AND WHEN I OPEN internal.db and 'accountdata' filtre = gang and delete all then bug solved but leavebutton not working %100 (%70 working) Edited February 14, 2018 by orcun99 Link to comment
Skully Posted February 15, 2018 Share Posted February 15, 2018 Sounds like the player isn't being removed from the database when they press leave. Are you getting any errors when someone attempts to leave their gang? Also double check your SQL query is correct and matches your database format/name. Link to comment
ada Posted February 15, 2018 Share Posted February 15, 2018 No one can help you about that , with stolen scripts make your own gang script. Link to comment
orcun99 Posted February 15, 2018 Author Share Posted February 15, 2018 3 hours ago, Skully said: Sounds like the player isn't being removed from the database when they press leave. Are you getting any errors when someone attempts to leave their gang? Also double check your SQL query is correct and matches your database format/name. all match no problem sql 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