Jump to content

[HELP] Dont Create Clan - Debug & SS


queenshe

Recommended Posts

Not create clan,

 

Debug;

http://prntscr.com/mp3ivq

-----------------

Hatanın olduğu if;

addEvent("CreateGroup",true)
addEventHandler("CreateGroup",root,function(Clan)
    local accountName = getElementData(source,"AccountName")
    local CheckClan = executeSQLQuery("SELECT * FROM ClanSistemi WHERE Clan=?",tostring(Clan))
    if ( type(CheckClan) == "table" and #CheckClan == 0 or not CheckClan ) then
      if getPlayerMoney(source) >= 500000 then 
        executeSQLQuery("INSERT INTO ClanSistemi (Account,Clan,RankPlayer,Kurucu,Event,Ruel) VALUES (?,?,?,?,?,?)",tostring(accountName),tostring(Clan),tostring("Kurucu"),tostring(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")),tostring("Yok"),tostring("Yok"))
        executeSQLQuery("INSERT INTO ClanSistemiUyeler (Account,Clan,RankPlayer,State,Name) VALUES (?,?,?,?,?)",tostring(accountName),tostring(Clan),tostring("Kurucu"),tostring("Açık"),tostring(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")))
        executeSQLQuery("INSERT INTO ClanSistemiBanka (Clan,Banka) VALUES (?,?)",tostring(Clan),tostring("10000"))
        executeSQLQuery("INSERT INTO ClanSistemiLevel (Clan,Level) VALUES (?,?)",tostring(Clan),tostring("1"))    
        executeSQLQuery("INSERT INTO ClanSistemiRENK (Clan,R,G,B) VALUES (?,?,?,?)",tostring(Clan),math.random(1,255),math.random(1,255),math.random(1,255))        
        _outputChatBox("Clanı Başarıyla Oluşturdun | "..tostring(Clan).."",source,0,255,255,true)
        triggerEvent("onPlayerCreatedGroup",source,source,Clan)
        setElementData(resourceRoot,"Event"..Clan.."","Yok")
        setElementData(resourceRoot,"Ruel"..Clan.."","Yok")
        setElementData(resourceRoot,"Kurucu"..Clan.."",tostring(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")))
        setElementData(resourceRoot,"Banka"..Clan.."","10000")
        setElementData(resourceRoot,"Level"..Clan.."","1")        
        setElementData(source,"Clan",tostring(Clan))
        setElementData(source,"RankPlayer",tostring("Kurucu"))
        takePlayerMoney(source,500000)
        --[[for _,plrs in ipairs (getElementsByType("player")) do
            getAllGroups(plrs)
        end--]]
      else
        _outputChatBox("Clan Kurabilmen İçin $500.000 İhtiyacın Var",source,255,0,0,true)
      end
    else
        _outputChatBox("Bu Clan Adı Kullanılamaz",source,255,0,0,true)
    end
end)

Link to comment
addEvent("CreateGroup",true)
addEventHandler("CreateGroup",root,function(Clan)
    local accountName = getElementData(source,"AccountName")
    local CheckClan = executeSQLQuery("SELECT * FROM ClanSistemi WHERE Clan=?",tostring(Clan))
    if ( type(CheckClan) == "table" and #CheckClan == 0 or not CheckClan ) then
      if getPlayerMoney(source) >= 500000 then 
        executeSQLQuery("INSERT INTO ClanSistemi (Account,Clan,RankPlayer,Kurucu,Event,Ruel) VALUES (?,?,?,?,?,?)",tostring(accountName),tostring(Clan),tostring("Kurucu"),tostring(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")),tostring("Yok"),tostring("Yok"))
        executeSQLQuery("INSERT INTO ClanSistemiUyeler (Account,Clan,RankPlayer,State,Name) VALUES (?,?,?,?,?)",tostring(accountName),tostring(Clan),tostring("Kurucu"),tostring("Açık"),tostring(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")))
        executeSQLQuery("INSERT INTO ClanSistemiBanka (Clan,Banka) VALUES (?,?)",tostring(Clan),tostring("10000"))
        executeSQLQuery("INSERT INTO ClanSistemiLevel (Clan,Level) VALUES (?,?)",tostring(Clan),tostring("1"))    
        executeSQLQuery("INSERT INTO ClanSistemiRENK (Clan,R,G,B) VALUES (?,?,?,?)",tostring(Clan),math.random(1,255),math.random(1,255),math.random(1,255))        
        _outputChatBox("Clanı Başarıyla Oluşturdun | "..tostring(Clan).."",source,0,255,255,true)
        triggerEvent("onPlayerCreatedGroup",source,source,Clan)
        setElementData(resourceRoot,"Event"..Clan.."","Yok")
        setElementData(resourceRoot,"Ruel"..Clan.."","Yok")
        setElementData(resourceRoot,"Kurucu"..Clan.."",tostring(string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")))
        setElementData(resourceRoot,"Banka"..Clan.."","10000")
        setElementData(resourceRoot,"Level"..Clan.."","1")        
        setElementData(source,"Clan",tostring(Clan))
        setElementData(source,"RankPlayer",tostring("Kurucu"))
        takePlayerMoney(source,500000)
        --[[for _,plrs in ipairs (getElementsByType("player")) do
            getAllGroups(plrs)
        end--]]
      else
        outputChatBox("Clan Kurabilmen İçin $500.000 İhtiyacın Var",source,255,0,0,true)
      end
    else
        outputChatBox("Bu Clan Adı Kullanılamaz",source,255,0,0,true)
    

Use this

  • Haha 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...