Jump to content

BigDaddy

Members
  • Posts

    28
  • Joined

  • Last visited

BigDaddy's Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. because i want to make clan system like group system addEventHandler("onClientGUIClick",root, function() if ( source == Create ) then if ( guiGetText(EditClanNameToCreate) ~= "" or guiGetText(EditClanNameToCreate) ~= " ") then triggerServerEvent("Create",localPlayer,guiGetText(EditClanNameToCreate)) end end end ) addEventHandler("onResourceStart",resourceRoot, function() local AllClansTable = executeSQLQuery ('CREATE TABLE IF NOT EXISTS `AllClansTable` ( ClanName,Members) ') if ( AllClansTable ) then outputDebugString("Sucsesfully Create SQL Table AllClansTable") local CheckWhenLogin = executeSQLQuery("CREATE TABLE IF NOT EXISTS 'CheckHaveClan?' (Account,ClanName)") if ( CheckWhenLogin ) then outputDebugString("Sucsesfully Create SQL Table CheckHaveClan? !") end end end ) addEvent("Create",true) addEventHandler("Create",root, function ( ClanName ) local Results = executeSQLQuery("SELECT * FROM `AllClansTable` WHERE ClanName=?",ClanName) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then local TonumberMembers = 1 executeSQLQuery("CREATE TABLE IF NOT EXISTS '".. ClanName .."' (PlayerAccount,PlayerName,Rank)") outputDebugString("Sucsesfully Create SQL Table Name : ".. ClanName .."") executeSQLQuery ( "INSERT INTO `AllClansTable` ( ClanName , Members ) VALUES(?,?)",ClanName,tonumber(TonumberMembers)) executeSQLQuery ( "INSERT INTO `'".. ClanName .."'` ( PlayerAccount,PlayerName,Rank ) VALUES(?,?,?)",getPlayerAccount(source),getPlayerName(source),"Clan Leader") executeSQLQuery ( "INSERT INTO `CheckHaveClan?` ( Account , ClanName ) VALUES(?,?)",getPlayerAccount(source),ClanName) setAccountData(getPlayerAccount(source),"HaveClan",true) setAccountData(getPlayerAccount(source),"Leader",true) outputChatBox("#FFF000Sucsesfully Created Clan [ #00FF00".. ClanName .."#FFF000 ]",source,255,255,255,true) else outputChatBox("*ERROR : THIS CLAN NAME IS ALREADY EXISTS !",source,255,0,0,true) end end ) addEventHandler("onPlayerLogin",root, function(_,acc) if ( getAccountData(acc,"HaveClan",true) ) then local CheckResults = executeSQLQuery("SELECT * FROM `CheckHaveClan?` WHERE Account=?",getAccountName(acc)) if ( type ( CheckResults ) == "table" and #CheckResults ~= 0 or CheckResults ) then setElementData(source,"ClanName","".. CheckResults[1]['ClanName'] .."") setElementData(source,"SendToClientHaveClan!",true) end end end )
  2. thank you TAPL can i create table sql with name that i write it in edit ? i mean like this addEventHandler("onClientGUIClick",root, function() if ( source == Create ) then triggerServerEvent("CreateTable",localPlayer,guiGetText(Edit)) end end ) addEvent("CreateTable",true) addEventHandler("CreateTable",root, function(Name) executeSQLQuery("CREATE TABLE IF NOT EXISTS '".. Name .."' (PlayerAccount,PlayerName,Rank)") end )
  3. Debugscript : ERROR: MyTestMode\server.lua:12: Database query failed: table AllReports has no column named Memo My Code : addEventHandler("onResourceStart", resourceRoot, function() local AllReports = executeSQLQuery("CREATE TABLE IF NOT EXISTS AllReports (PlrName, Subject, Memo)") if AllReports then outputDebugString("Sucsesfully Create SQL Table 'AllReports'") end end) addEvent("INSERT",true) addEventHandler("INSERT", root, function(PlrName, tSubject, tMemo) executeSQLQuery("INSERT INTO AllReports (PlrName , Subject , Memo) VALUES (?, ?, ?)", PlrName, tSubject, tMemo) outputChatBox("#FFF000Sucsesfully Send Report [ #00FF00"..tSubject.."#FFF000 ] To Servre Owner", source, 255, 255, 255, true) end)
  4. i make it but there is error in insert when i write in subject edit Test and then click button send debugscript say to me : ERROR: Test\server.lua:15: Database query failed: no such table: 'Test' addEventHandler("onClientGUIClick",root, function() if ( source == Send ) then local tSubject = guiGetText(SendSubject) local tMeMo = guiGetText(SendMemo) local tPlrName = getPlayerName(localPlayer) if (tSubject and tSubject ~= "" or tSubject ~= " " and tMeMo ~= "" or tMeMo ~=" ") then triggerServerEvent("INSERT",localPlayer,tPlrName,tSubject,tMeMo) end end end ) addEventHandler("onResourceStart",resourceRoot, function() local AllReports = executeSQLQuery ('CREATE TABLE IF NOT EXISTS `AllReports` ( PlrName , Subject ) ') if ( AllReports ) then outputDebugString("Sucsesfully Create SQL Table 'AllReports'") end end ) addEvent("INSERT",true) addEventHandler("INSERT",root, function ( PlrName , tSubject , tMemo ) executeSQLQuery("CREATE TABLE IF NOT EXISTS '".. tSubject .."' (PlayerName,Subject,Memo)") outputDebugString("Sucsesfully Create SQL Table Name : ".. tSubject .."") executeSQLQuery ( "INSERT INTO `AllReports` ( PlrName , Subject ) VALUES(?,?)",PlrName,tSubject) executeSQLQuery ( "INSERT INTO `'".. tSubject .."'` ( PlayerName,Subject,Memo ) VALUES(?,?,?)",PlrName,tSubject,tMemo) outputChatBox("#FFF000Sucsesfully Send Report [ #00FF00".. tSubject .."#FFF000 ] To Servre Owner",source,255,255,255,true) end )
  5. WTF i want function that i should use it to make this i made THE GUI AND EVERYTHINK !!
  6. hi guys , i want to make report like this if anyone write subject in edit and text in the memo and click send like then the subject put in gridlist and when anyone click open and select subject name in the gridlist he open to him window and put in the edit the subject and text in the memo that who write it when he send like this :
  7. جرب ذا local Zombe3 = createColRectangle ( x,y,z ) addEventHandler("onZombieWasted",root, function ( attacker ,_ ,_ ) if ( isElementWithinColShape(attacker, Zombe3) ) then setElementData (attacker, "zom", (getElementData (attacker, "zom") or 0) + 1) local data = getElementData(attacker,"zom") end end ) function LeaveA(plr) outputChatBox("You Kill : ".. tonumber(data) .." Zombies ",plr,255,255,255,true) addEventHandler("onColShapeLeave",Zombe3,LeaveA) واذا ماضبط جرب ذا , outputChatBox("You Kill : ".. getElementData(plr,"zom") .." Zombies ",plr,255,255,255,true) واذا ماضبط جرب ذا ض1 , local Zombe3 = createColRectangle ( x,y,z ) addEventHandler("onZombieWasted",root, function ( attacker ,_ ,_ ) if ( isElementWithinColShape(attacker, Zombe3) ) then setElementData (attacker, "zom", (getElementData (attacker, "zom") or 0) + 1) end end ) function LeaveA(plr) local data = getElementData(plr,"zom") outputChatBox("You Kill : ".. tonumber(data) .." Zombies ",plr,255,255,255,true) addEventHandler("onColShapeLeave",Zombe3,LeaveA)
  8. اكتب الجملة كلها : )
  9. وش يقول ؟ + _,_ ذولا ارقمنتات مانحتاجها فما خليتهم وتقدر بعد ماتخلي شيء
  10. جرب ذا local Zombe3 = createColRectangle ( x,y,z ) addEventHandler("onZombieWasted",root, function ( attacker ,_ ,_ ) if ( isElementWithinColShape(attacker, Zombe3) ) then setElementData (attacker, "zom", (getElementData (attacker, "zom") or 0) + 1) end end ) function LeaveA(plr) outputChatBox("You Kill : ".. getElementData(plr,"zom") or 0) .." Zombies ",plr,255,255,255,true) addEventHandler("onColShapeLeave",Zombe3,LeaveA)
  11. انا جلبت كل شيء وخليته في عالم وهمي 2 اذا اشتغل بالداتا ماعتقد احتاج xml بضيفك سكايب بوريك الي سويته . القيم مود المنشور sigmar او bonasi ?
  12. انا سويت لودر ، DM اذا الماب اشتغل وهو يجيب كل شيء يخليه عالم وهمي 2 الي ابي اعرفه الحين كيف اخلي المابات شغالين في عالم وهمي 2 بحيث من الاعب يخش عالم وهمي 2 يلعب
  13. لول شكلك مافهمت قصدي ، انا بسوي نفس multigamemode, بخليه اذا خش ماركر الاول يلعب مابات dm في عالم وهمي 2 ، واذا خش الماركر الثاني يلعب مابات DD في عالم وهمي3. وذا الي ابي اعرفه كيف اسويه .
×
×
  • Create New...