iMr.WiFi..! Posted April 24, 2016 Share Posted April 24, 2016 الحين مسوي حفظ اشياء في الكيو لايت خلصت بعدين ودي استخرج الي في المحفوظ في الكيو لايت الى الجريد ليست كيف ؟ Link to comment
YourMind Posted April 24, 2016 Share Posted April 24, 2016 s = executeSQLQuery ("SELECT * FROM table") -- return زي الـ --بس يرجعلك القيمة بالجدول اللي انت اختارته و لو عايز تجيب قيمة اتحفظت و موجودة في القاعدة -- * القيمة موجودة في الكولمن s[1]["اسم الكولمن"] او for i,k in ipairs (s) do outputChatBox (k.اسم الكولمن) end Link to comment
#DRAGON!FIRE Posted April 24, 2016 Share Posted April 24, 2016 شف هذا راح يفيدك : Client Side ! < بــ جانب كلنتلو ما فهمت قصدي انه بـ اول سطر انه تضعها مع كود فتح النافذة .. : واللاعب يفتح النافذة تحط اول سطر به زي كذا مثال bindKey يعني اقصد يوم تسوي فنكشن الـ bindKey( "F2", "down", function ( ) guiSetVisible ( element, not guiGetVisible( element ) ) showCursor( guiGetVisible( element ) ) getGroups ( ) -- ضعها بـ كود فتح النافذة end ) getGroups ( ) -- ضعها بـ كود فتح النافذة function getGroups ( ) triggerServerEvent( "GetallGroups", localPlayer ) end addEvent( "UpGroups", true ) addEventHandler( "UpGroups", root, function( allGro ) guiGridListClear( Grid ) for _,Groups in ipairs ( allGro ) do local row = guiGridListAddRow( Grid ) guiGridListSetItemText( Grid, row, 1, tostring( Groups.groupName ), false, false ) end end ) Server Side ! < بـ جانب سيرفر function allGroups() local Row = executeSQLQuery("SELECT * FROM Gangs") if ( type( Row ) == "table" and #Row == 0 or not Row ) then return {} else return Row end end addEvent( "GetallGroups", true ) addEventHandler( "GetallGroups", root, function( ) local Groups = { } for _,NameGroups in ipairs ( allGroups( ) ) do table.insert( Groups, {groupName = NameGroups.Name} ) end triggerClientEvent( source, "UpGroups", source, Groups ) end ) Link to comment
iMr.WiFi..! Posted April 24, 2016 Author Share Posted April 24, 2016 addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[3] then s = executeSQLQuery ("SELECT * FROM table") for i, vk in ipairs (Apps) do local row = guiGridListAddRow ( grid ) guiGridListSetItemText(grid, row, col,s, false, false) end end end ) هذا مثال فهمته منك صلحه عشان يدخل في مخيي Link to comment
Abdul KariM Posted April 24, 2016 Share Posted April 24, 2016 الاس كيولايت سيرفر سايد كيف تحطه بكلينت بتحتاج ترايقر Link to comment
YourMind Posted April 24, 2016 Share Posted April 24, 2016 و وريني اللي انت عملته بالكامل عشان افهم بالظبط انت بتحاول تعمل ايه Link to comment
iMr.WiFi..! Posted April 24, 2016 Author Share Posted April 24, 2016 (edited) ---- ] =) GG u lose <> Edited April 25, 2016 by Guest Link to comment
YourMind Posted April 24, 2016 Share Posted April 24, 2016 شغل دماغك addEventHandler("onResourceStart",resourceRoot, function () for i,k in ipairs (getElementsByType("player")) do s = executeSQLQuery ("SELECT * FROM SaveCodes WHERE Serial =?",getPlayerSerial(k)) if #s > 0 then --outputChatBox ("يوجد معلومات مخزنة عند بعض الاعبين") end end end) عايز تجيب اسمهم من القاعدة في الشات مثلاً؟ addEventHandler("onResourceStart",resourceRoot, function () for i,k in ipairs (getElementsByType("player")) do s = executeSQLQuery ("SELECT * FROM SaveCodes WHERE Serial =?",getPlayerSerial(k)) if #s > 0 then outputChatBox(s[1]["PlayerName"]) end end end) بتريجر؟ gridlist او edit او مثلاً عايز تحط المعلومات دي في addEventHandler("onResourceStart",resourceRoot, function () for i,k in ipairs (getElementsByType("player")) do s = executeSQLQuery ("SELECT * FROM SaveCodes WHERE Serial =?",getPlayerSerial(k)) if #s > 0 then triggerClientEvent(k,"",k,s[1]["Code1"],s[1]["Code2"],s[1]["Code3"]) end end end) Link to comment
iMr.WiFi..! Posted April 24, 2016 Author Share Posted April 24, 2016 ^ طيب مثلا لو ابي احفظ اسمه الاكواد الي سجلها في الايديتات الثلاث وسريال واحطه في الجريد ليست , كيف بحفظها ولا طريقتي الي انا سويتها خطأ ؟ انا ابي احفظ واحدث عشان يكون موجود في الجريد ليست Link to comment
YourMind Posted April 24, 2016 Share Posted April 24, 2016 طريقتك صح شوف مثالي اولاً addEventHandler ("onClientResourceStart",resourceRoot, triggerClientEvent ("wifi",localPlayer) end) V addEvent ("wifi",true) addEventHandler ("wifi",root, function () s = executeSQLQuery ("SELECT * FROM SaveCodes WHERE Serial =?",getPlayerSerial(source)) if #s > 0 then local name = s[1]["PlayerName"] local code1 = s[1]["Code1"] local code2 = s[1]["Code2"] local code3 = s[1]["Code3"] local serial = s[1]["Serial"] triggerClientEvent (source,"put",source,name,code1,code2,code3,serial) else return outputChatBox ("لا يوجد معلومات") end end) V addEvent("put",true) addEventHandler ("put",root, function (name,code1,code2,code3,serial) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(name),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code1),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code2),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code3),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(serial),false,false) end) Link to comment
iMr.WiFi..! Posted April 24, 2016 Author Share Posted April 24, 2016 ^ مشكور جداً افدتني + طلب تاني الحين لو ابي انسخ كل الموجود في الرو كيف انسخه ؟ اي فنكشنات بحتاجها ؟ Link to comment
Me[Z]oO Posted April 24, 2016 Share Posted April 24, 2016 طريقتك صحشوف مثالي اولاً addEventHandler ("onClientResourceStart",resourceRoot, triggerClientEvent ("wifi",localPlayer) end) V addEvent ("wifi",true) addEventHandler ("wifi",root, function () s = executeSQLQuery ("SELECT * FROM SaveCodes WHERE Serial =?",getPlayerSerial(source)) if #s > 0 then local name = s[1]["PlayerName"] local code1 = s[1]["Code1"] local code2 = s[1]["Code2"] local code3 = s[1]["Code3"] local serial = s[1]["Serial"] triggerClientEvent (source,"put",source,name,code1,code2,code3,serial) else return outputChatBox ("لا يوجد معلومات") end end) V addEvent("put",true) addEventHandler ("put",root, function (name,code1,code2,code3,serial) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(name),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code1),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code2),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code3),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(serial),false,false) end) outputChatBox ("لا يوجد معلومات") خطأ لازم تحدد لمين يرسل الرسالة outputChatBox ("لا يوجد معلومات",source) هيك ^ Link to comment
iMr.WiFi..! Posted April 24, 2016 Author Share Posted April 24, 2016 (edited) What U want ? Edited April 25, 2016 by Guest Link to comment
Simple. Posted April 24, 2016 Share Posted April 24, 2016 بدل اللوكل بلاير في الترايقر لـ روت root Link to comment
iMr.WiFi..! Posted April 24, 2016 Author Share Posted April 24, 2016 (edited) :@ Edited April 25, 2016 by Guest Link to comment
YourMind Posted April 24, 2016 Share Posted April 24, 2016 (edited) outputChatBox ("لا يوجد معلومات") خطأ لازم تحدد لمين يرسل الرسالة outputChatBox ("لا يوجد معلومات",source) هيك ^ مش خطأ الرسالة توصل لجميع الاعبين عادي -.- - Edited April 25, 2016 by Guest Link to comment
Abdul KariM Posted April 24, 2016 Share Posted April 24, 2016 اتمنى تتعلم من اخطائك كلينت : GUIEditor = { checkbox = {}, radiobutton = {}, button = {}, window = {}, label = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(122, 119, 799, 561, "--------------لوحة شراء--------------", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF108B00") GUIEditor.label[1] = guiCreateLabel(282, 29, 215, 51, "تعليمات", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 252, 254, 54) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.label[2] = guiCreateLabel(117, 58, 592, 79, "!الادارة غير مسؤولة تماما اي تعاملات خارج هده اللوحة", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 254, 17, 17) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) GUIEditor.label[3] = guiCreateLabel(22, 32, 533, 101, "جميع بطاقات الشحن والكاش يو يتم وضعها في هده اللوحة لحماية الاعب من النصب والاحتيال", false, GUIEditor.label[2]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 254, 17, 17) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) GUIEditor.label[4] = guiCreateLabel(117, 141, 566, 46, " ملاحظة سيتم تسليم بعد مرور 24 ساعة ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 21, 249, 193) guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) GUIEditor.label[5] = guiCreateLabel(646, 197, 127, 38, "نوع بطاقة شحن", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 225, 227, 1) GUIEditor.label[6] = guiCreateLabel(476, 198, 127, 41, "STC - سوا", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 250, 250, 250) GUIEditor.radiobutton[1] = guiCreateRadioButton(60, 0, 17, 18, "", false, GUIEditor.label[6]) GUIEditor.label[7] = guiCreateLabel(311, 196, 103, 43, "كاش يو CachU", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[7], "default-bold-small") GUIEditor.radiobutton[2] = guiCreateRadioButton(84, 0, 15, 17, "", false, GUIEditor.label[7]) GUIEditor.label[8] = guiCreateLabel(96, 192, 154, 50, "اتصالات المغرب", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[8], "default-bold-small") GUIEditor.radiobutton[3] = guiCreateRadioButton(92, 3, 20, 15, "تننبببببببب", false, GUIEditor.label[8]) guiRadioButtonSetSelected(GUIEditor.radiobutton[3], true) GUIEditor.label[9] = guiCreateLabel(307, 242, 113, 39, "تاج خاص مزخرف ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[9], "default-bold-small") GUIEditor.label[10] = guiCreateLabel(95, 242, 124, 38, "رتب او مشتريات اخرى", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[10], "default-bold-small") GUIEditor.button[1] = guiCreateButton(386, -9878, 135, 768, "", false, GUIEditor.window[1]) GUIEditor.checkbox[1] = guiCreateCheckBox(219, 246, 21, 16, "", false, false, GUIEditor.window[1]) GUIEditor.checkbox[2] = guiCreateCheckBox(420, 242, 20, 20, "", true, false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(297, 336, 251, 30, "", false, GUIEditor.window[1]) GUIEditor.label[11] = guiCreateLabel(175, 286, 499, 31, "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[11], "default-bold-small") guiLabelSetColor(GUIEditor.label[11], 225, 227, 1) GUIEditor.label[12] = guiCreateLabel(593, 340, 114, 36, "ارقام بطاقات الشحن", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[12], "default-bold-small") guiLabelSetColor(GUIEditor.label[12], 225, 227, 1) GUIEditor.label[13] = guiCreateLabel(618, 233, 125, 31, "الاشياء المراد شرائها", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[13], "default-bold-small") guiLabelSetColor(GUIEditor.label[13], 225, 227, 1) GUIEditor.button[3] = guiCreateButton(347, 495, 150, 56, "ارسال المعلومات", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF00E3C1") GUIEditor.edit[2] = guiCreateEdit(294, 370, 254, 30, "", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(294, 405, 254, 32, "", false, GUIEditor.window[1]) GUIEditor.label[14] = guiCreateLabel(112, 446, 565, 22, "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[14], 225, 227, 1) wnd = guiCreateWindow(252, 187, 580, 416, "مرحبا بكم", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "FFE1E301") Grid = guiCreateGridList(48, 86, 489, 267, false, wnd) ID = guiGridListAddColumn( Grid, "ID :", 0.40 ) col = guiGridListAddColumn( Grid, "Player :", 0.40 ) col1 = guiGridListAddColumn( Grid, "Account :", 0.60 ) col2 = guiGridListAddColumn( Grid, "Code1 :", 1.00 ) col3 = guiGridListAddColumn( Grid, "Code2 :", 1.00 ) col4 = guiGridListAddColumn( Grid, "Code3 :", 1.00 ) col5 = guiGridListAddColumn( Grid, "Serial :", 1.00 ) Gss = guiCreateLabel(227, 28, 481, 48, "حسابات المشتريين", false, wnd) guiSetFont(Gss, "default-bold-small") guiLabelSetColor(Gss, 0, 227, 193) GUIEditor.label[555] = guiCreateLabel(72, 51, 455, 31, "------------------------------------------------------------------------------------------------------------", false,wnd) guiSetFont(GUIEditor.label[555], "default-bold-small") guiLabelSetColor(GUIEditor.label[555], 225, 227, 1) Refresh = guiCreateButton(39, 363, 124, 43, "تحديت#", false, wnd) guiSetFont(Refresh, "default-bold-small") guiSetProperty(Refresh, "NormalTextColour", "FF00E3C1") Remove = guiCreateButton(377, 362, 119, 44, "#نسخ", false, wnd) guiSetFont(Remove, "default-bold-small") guiSetProperty(Remove, "NormalTextColour", "FF00E3C1") guiSetVisible(wnd,false) guiSetVisible(GUIEditor.window[1],false) -------- --Start Codes -------- addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[3] then local Number1 = guiGetText(GUIEditor.edit[1]) local Number2 = guiGetText(GUIEditor.edit[2]) local Number3 = guiGetText(GUIEditor.edit[3]) if Number1 ~= "" and Number2 ~= "" and Number3 ~= "" and tonumber(Number1) and tonumber(Number2) and tonumber(Number3) then triggerServerEvent("SLL",localPlayer,Number1,Number2,Number3) outputChatBox("تمت ارسال المعلومات ,",0,255,0) end end end ) addEvent("put",true) addEventHandler ("put",root, function ( Num , name,account,code1,code2,code3,serial) guiGridListClear ( Grid ) local row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid,row,ID,tostring( Num ),false,false) guiGridListSetItemText ( Grid,row,col,tostring ( name ),false,false) guiGridListSetItemColor ( Grid,row,col,255,255,0) guiGridListSetItemText ( Grid,row,col1,tostring( account ),false,false) guiGridListSetItemColor ( Grid,row,col1,255,255,0) guiGridListSetItemText ( Grid,row,col2,tostring( code1 ),false,false) guiGridListSetItemColor ( Grid,row,col2,255,255,0) guiGridListSetItemText ( Grid,row,col3,tostring( code2 ),false,false) guiGridListSetItemColor ( Grid,row,col3,255,255,0) guiGridListSetItemText ( Grid,row,col4,tostring( code3 ),false,false) guiGridListSetItemColor ( Grid,row,col4,255,255,0) guiGridListSetItemText ( Grid,row,col5,tostring( serial ),false,false) guiGridListSetItemColor ( Grid,row,col5,255,255,0) end) addEventHandler("onClientGUIClick", root, function() if source == Refresh then triggerServerEvent('refresh',localPlayer) end end ) addEvent("Open",true) addEventHandler("Open",root, function() local state = ( not guiGetVisible ( wnd ) ) guiSetVisible ( wnd, state ) showCursor ( state ) end ) bindKey ( "F9", "down", function ( ) local state = ( not guiGetVisible ( GUIEditor.window[1] ) ) guiSetVisible ( GUIEditor.window[1], state ) showCursor ( state ) end ) سيرفر function allInf() local Row = executeSQLQuery("SELECT * FROM SaveCodes") if ( type( Row ) == "table" and #Row == 0 or not Row ) then return {} else return Row end end executeSQLQuery("CREATE TABLE IF NOT EXISTS `SaveCodes` (PlayerName TEXT,Account TEXT, Code1 TEXT, Code2 TEXT, Code3 TEXT, Serial TEXT)") addEvent("SLL",true) addEventHandler("SLL", root, function ( Number1, Number2, Number3) local aSerial = getPlayerSerial( source ) local Results = executeSQLQuery("SELECT * FROM `SaveCodes` WHERE Serial=?", tostring (aSerial ) ) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO `SaveCodes` ( PlayerName,Account,Code1,Code2,Code3,Serial ) VALUES(?,?,?,?,?,?)",tostring (getPlayerName(source)),tostring(getAccountName(getPlayerAccount ( source ) )),tostring(Number1),tostring ( Number2 ),tostring ( Number3 ),tostring ( aSerial ) ) else executeSQLQuery('UPDATE `SaveCodes` SET PlayerName =?, Account =?, Code1 =?, Code2 =? , Code3 =? WHERE Serial =?', tostring (getPlayerName(source)),tostring(getAccountName(getPlayerAccount ( source ) )),tostring(Number1),tostring ( Number2 ),tostring ( Number3 ),tostring ( aSerial )) end end ) addCommandHandler('Buys', function ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(player,"Open",player) end end ) -- Za7f _ addEvent('refresh',true) addEventHandler('refresh',root, function() for i , Inf in ipairs ( allInf() ) do triggerClientEvent( source, "put", source, i , Inf.PlayerName , Inf.Account , Inf.Code1 , Inf.Code2,Inf.Code3 ,Inf.Serial ) end end ) Link to comment
Abdul KariM Posted April 24, 2016 Share Posted April 24, 2016 outputChatBox ("لا يوجد معلومات") خطأ لازم تحدد لمين يرسل الرسالة outputChatBox ("لا يوجد معلومات",source) هيك ^ مش خطأ الرسالة توصل لجميع الاعبين عادي -.- GUIEditor = { checkbox = {}, radiobutton = {}, button = {}, window = {}, label = {}, edit = {} } GUIEditor.window[1] = guiCreateWindow(122, 119, 799, 561, "--------------لوحة شراء--------------", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF108B00") GUIEditor.label[1] = guiCreateLabel(282, 29, 215, 51, "تعليمات", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 252, 254, 54) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.label[2] = guiCreateLabel(117, 58, 592, 79, "!الادارة غير مسؤولة تماما اي تعاملات خارج هده اللوحة", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 254, 17, 17) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) GUIEditor.label[3] = guiCreateLabel(22, 32, 533, 101, "جميع بطاقات الشحن والكاش يو يتم وضعها في هده اللوحة لحماية الاعب من النصب والاحتيال", false, GUIEditor.label[2]) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 254, 17, 17) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) GUIEditor.label[4] = guiCreateLabel(117, 141, 566, 46, " ملاحظة سيتم تسليم بعد مرور 24 ساعة ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 21, 249, 193) guiLabelSetHorizontalAlign(GUIEditor.label[4], "center", false) GUIEditor.label[5] = guiCreateLabel(646, 197, 127, 38, "نوع بطاقة شحن", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 225, 227, 1) GUIEditor.label[6] = guiCreateLabel(476, 198, 127, 41, "STC - سوا", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 250, 250, 250) GUIEditor.radiobutton[1] = guiCreateRadioButton(60, 0, 17, 18, "", false, GUIEditor.label[6]) GUIEditor.label[7] = guiCreateLabel(311, 196, 103, 43, "كاش يو CachU", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[7], "default-bold-small") GUIEditor.radiobutton[2] = guiCreateRadioButton(84, 0, 15, 17, "", false, GUIEditor.label[7]) GUIEditor.label[8] = guiCreateLabel(96, 192, 154, 50, "اتصالات المغرب", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[8], "default-bold-small") GUIEditor.radiobutton[3] = guiCreateRadioButton(92, 3, 20, 15, "تننبببببببب", false, GUIEditor.label[8]) guiRadioButtonSetSelected(GUIEditor.radiobutton[3], true) GUIEditor.label[9] = guiCreateLabel(307, 242, 113, 39, "تاج خاص مزخرف ", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[9], "default-bold-small") GUIEditor.label[10] = guiCreateLabel(95, 242, 124, 38, "رتب او مشتريات اخرى", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[10], "default-bold-small") GUIEditor.button[1] = guiCreateButton(386, -9878, 135, 768, "", false, GUIEditor.window[1]) GUIEditor.checkbox[1] = guiCreateCheckBox(219, 246, 21, 16, "", false, false, GUIEditor.window[1]) GUIEditor.checkbox[2] = guiCreateCheckBox(420, 242, 20, 20, "", true, false, GUIEditor.window[1]) GUIEditor.edit[1] = guiCreateEdit(297, 336, 251, 30, "", false, GUIEditor.window[1]) GUIEditor.label[11] = guiCreateLabel(175, 286, 499, 31, "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[11], "default-bold-small") guiLabelSetColor(GUIEditor.label[11], 225, 227, 1) GUIEditor.label[12] = guiCreateLabel(593, 340, 114, 36, "ارقام بطاقات الشحن", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[12], "default-bold-small") guiLabelSetColor(GUIEditor.label[12], 225, 227, 1) GUIEditor.label[13] = guiCreateLabel(618, 233, 125, 31, "الاشياء المراد شرائها", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[13], "default-bold-small") guiLabelSetColor(GUIEditor.label[13], 225, 227, 1) GUIEditor.button[3] = guiCreateButton(347, 495, 150, 56, "ارسال المعلومات", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF00E3C1") GUIEditor.edit[2] = guiCreateEdit(294, 370, 254, 30, "", false, GUIEditor.window[1]) GUIEditor.edit[3] = guiCreateEdit(294, 405, 254, 32, "", false, GUIEditor.window[1]) GUIEditor.label[14] = guiCreateLabel(112, 446, 565, 22, "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", false, GUIEditor.window[1]) guiLabelSetColor(GUIEditor.label[14], 225, 227, 1) wnd = guiCreateWindow(252, 187, 580, 416, "مرحبا بكم", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 1.00) guiSetProperty(wnd, "CaptionColour", "FFE1E301") Grid = guiCreateGridList(48, 86, 489, 267, false, wnd) col = guiGridListAddColumn( Grid, "Player :", 0.40 ) col1 = guiGridListAddColumn( Grid, "Account :", 0.60 ) col2 = guiGridListAddColumn( Grid, "Code1 :", 1.00 ) col3 = guiGridListAddColumn( Grid, "Code2 :", 1.00 ) col4 = guiGridListAddColumn( Grid, "Code3 :", 1.00 ) col5 = guiGridListAddColumn( Grid, "Serial :", 1.00 ) Gss = guiCreateLabel(227, 28, 481, 48, "حسابات المشتريين", false, wnd) guiSetFont(Gss, "default-bold-small") guiSetFont(Grid, "default-bold-small") guiLabelSetColor(Gss, 0, 227, 193) GUIEditor.label[555] = guiCreateLabel(72, 51, 455, 31, "------------------------------------------------------------------------------------------------------------", false,wnd) guiSetFont(GUIEditor.label[555], "default-bold-small") guiLabelSetColor(GUIEditor.label[555], 225, 227, 1) Refresh = guiCreateButton(39, 363, 124, 43, "تحديت#", false, wnd) guiSetFont(Refresh, "default-bold-small") guiSetProperty(Refresh, "NormalTextColour", "FF00E3C1") Remove = guiCreateButton(377, 362, 119, 44, "#نسخ", false, wnd) guiSetFont(Remove, "default-bold-small") guiSetProperty(Remove, "NormalTextColour", "FF00E3C1") guiSetVisible(wnd,false) guiSetVisible(GUIEditor.window[1],false) -------- --Start Codes -------- addEventHandler ("onClientResourceStart",resourceRoot, function () triggerServerEvent ("SQL",localPlayer) triggerServerEvent ("wifi",localPlayer) end) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.button[3] then local Number1 = guiGetText(GUIEditor.edit[1]) local Number2 = guiGetText(GUIEditor.edit[2]) local Number3 = guiGetText(GUIEditor.edit[3]) local Serial = getPlayerSerial( source ) if Serial and tonumber(Number1) and tonumber(Number2) and tonumber(Number3) then triggerServerEvent("SLL",localPlayer,Number1,Number2,Number3,Serial) outputChatBox("تمت ارسال المعلومات ,",0,255,0) local row = guiGridListAddRow (Grid) triggerServerEvent ("acP",root,localPlayer,Number1,Number2,Number3,Serial) end end end) addEvent ("acPP",true) addEventHandler ("acPP",root, function (acc,name,Number1,Number2,Number3,Serial) row = guiGridListAddRow (Grid) guiGridListSetItemText (Grid,row,1,name,false,false) guiGridListSetItemText (Grid,row,2,acc,false,false) guiGridListSetItemText (Grid,row,3,Number1,false,false) guiGridListSetItemText (Grid,row,4,Number2,false,false) guiGridListSetItemText (Grid,row,5,Number3,false,false) guiGridListSetItemText (Grid,row,6,Serial,false,false) end) function SQLP(SQLData) for i,k in ipairs (SQLData) do local row = guiGridListAddRow (Grid) guiGridListSetItemText (Grid,row,1,k.PlayerName,false,false) guiGridListSetItemText (Grid,row,2,k.Account,false,false) guiGridListSetItemText (Grid,row,3,k.Code1,false,false) guiGridListSetItemText (Grid,row,4,k.Code2,false,false) guiGridListSetItemText (Grid,row,5,k.Code3,false,false) guiGridListSetItemText (Grid,row,6,k.Serial,false,false) end end addEvent("put",true) addEventHandler ("put",root,SQLP) addEvent ("put2",true) addEventHandler ("put2",root, function (s) guiGridListClear(Grid) SQLP(s) end) addEventHandler("onClientGUIClick", root, function() if source == Refresh then triggerServerEvent('refresh',localPlayer) end end ) addEvent("Open",true) addEventHandler("Open",root, function() local state = ( not guiGetVisible ( wnd ) ) guiSetVisible ( wnd, state ) showCursor ( state ) end ) bindKey ( "F10", "down", function ( ) local state = ( not guiGetVisible ( GUIEditor.window[1] ) ) guiSetVisible ( GUIEditor.window[1], state ) showCursor ( state ) end ) addEvent ("SQL",true) addEventHandler ("SQL",root, function () executeSQLQuery("CREATE TABLE IF NOT EXISTS `saveTable` (PlayerName,Account,Code1,Code2,Code3,Serial)") end) addEvent ("SLL",true) addEventHandler ("SLL",root, function ( Number1, Number2, Number3, Serial) executeSQLQuery ( "INSERT INTO `saveTable` ( PlayerName,Account,Code1,Code2,Code3,Serial ) VALUES(?,?,?,?,?,?)",getPlayerName(source),getAccountName(getPlayerAccount(source)),Number1,Number2,Number3,Serial ) end ) addEvent ("wifi",true) addEventHandler ("wifi",root, function () s = executeSQLQuery ("SELECT * FROM saveTable") triggerClientEvent (source,"put",source,s) end) addCommandHandler('مشتريات', function ( player ) local accName = getAccountName ( getPlayerAccount ( player ) ) if accName == "guest" then return end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then triggerClientEvent(player,"Open",player) end end ) addEvent('refresh',true) addEventHandler('refresh',root, function() s = executeSQLQuery ("SELECT * FROM saveTable") triggerClientEvent (source,"put2",source,s) end) addEvent ("acP",true) addEventHandler ("acP",root, function (plr,Number1,Number2,Number3,Serial) local acc = getAccountName (getPlayerAccount(plr)) local name = getPlayerName (plr) triggerClientEvent (root,"acPP",root,acc,name,Number1,Number2,Number3,Serial) end) استخدم guiGridListGetSelectedItem -- تحقق guiGridListGetItemText setClipboard عشان النسخ سطر 124 كيف تجيب سريال الزر ؟ Link to comment
YourMind Posted April 24, 2016 Share Posted April 24, 2016 ماخدتش بالي و عادي تشتغل برضه شغلك فوق غلط × غلط Link to comment
Abdul KariM Posted April 24, 2016 Share Posted April 24, 2016 ماخدتش باليو عادي تشتغل برضه شغلك فوق غلط × غلط getPlayerSerial Note: The client side version of getPlayerSerial has been deprecated as it can return the wrong value for some players, and is potentially insecure. The following article assumes that the function is serverside only. استخدامه صار سيرفر سايد فقط , كيف عادي ؟ + كودي شغال , بس ماحبيت اكمل اخليه يحاول عشان نصححه له فقط + لو تلاحظ صححت له الاخطاء فقط Link to comment
Abdul KariM Posted April 24, 2016 Share Posted April 24, 2016 ماتحكمش من غير ماتجرب انا ماجربت كودك , + انت ماتحققت ان الي مكتوب بالايدت ماهب فاضي + مع الوقت راح يبان استخدام السريال بالكلينت < على العموم مانبي نعطي الموضوع اكبر من حجمه , واهم شي نفيد صاحب الموضوع بالتوفيق Link to comment
Jupi Posted April 24, 2016 Share Posted April 24, 2016 طريقتك صحشوف مثالي اولاً addEventHandler ("onClientResourceStart",resourceRoot, triggerClientEvent ("wifi",localPlayer) end) V addEvent ("wifi",true) addEventHandler ("wifi",root, function () s = executeSQLQuery ("SELECT * FROM SaveCodes WHERE Serial =?",getPlayerSerial(source)) if #s > 0 then local name = s[1]["PlayerName"] local code1 = s[1]["Code1"] local code2 = s[1]["Code2"] local code3 = s[1]["Code3"] local serial = s[1]["Serial"] triggerClientEvent (source,"put",source,name,code1,code2,code3,serial) else return outputChatBox ("لا يوجد معلومات") end end) V addEvent("put",true) addEventHandler ("put",root, function (name,code1,code2,code3,serial) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(name),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code1),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code2),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(code3),false,false) guiGridListSetItemText (grid,guiGridListAddRow (grid),1,tostring(serial),false,false) end) outputChatBox ("لا يوجد معلومات") خطأ لازم تحدد لمين يرسل الرسالة outputChatBox ("لا يوجد معلومات",source) هيك ^ ضض اصلا هو مسوي التريقر للكلاينت ورايح يسوي فنكنشات جهة سيرفر هناك و انت جالس تخبص في شيء ثاني وبما انه ينفذ جهة كلاينت كلامك غلط و هو صح Link to comment
iMr.WiFi..! Posted April 25, 2016 Author Share Posted April 25, 2016 شكراً للي رد واتمنى حذف الاكواد , انا سيء جداً في اس كيو لايت واتمنى اني اتحسن 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