#AL-J7EEEM Posted March 14, 2017 Share Posted March 14, 2017 السلام عليكم ممكن حد يحطلي ليبل في مود يعني ابي اليبل يجيب اسم الحساب الشخص الي رسل والمود هو مود شراء المود حق مستر جراند انا ماعرفت احط تصميمه اليبل فا اسف بتعبكم معي Photo = {} WND = {} Close = {} local screenW, screenH = guiGetScreenSize() WND.ShowWindow = guiCreateWindow((screenW - 746) / 2, (screenH - 519) / 2, 746, 519, "", false) guiWindowSetSizable(WND.ShowWindow, false) guiSetAlpha(WND.ShowWindow, 1.00) guiSetProperty(WND.ShowWindow, "CaptionColour", "FFFE00E9") guiSetVisible(WND.ShowWindow, false) Photo.ShowWindow = guiCreateStaticImage(10, 22, 726, 455, "ShowPhoto.png", false, WND.ShowWindow) guiSetAlpha(Photo.ShowWindow, 0.75) Close.ShowWindow = guiCreateButton(635, 483, 101, 26, "X", false, WND.ShowWindow) guiSetFont(Close.ShowWindow, "default-bold-small") guiSetProperty(Close.ShowWindow, "NormalTextColour", "FFFE0000") Players = { GridList = {} } cardType = { Label = {} } DeleteAll = { Button = {} } CardsNumbers = { GridList = {} } X = { Button = {} } BuyingManager = {} CopySerial = { Button = {} } TotalPrice = { Label = {} } PlayerSerial = { Label = {} } CardNumber = { Edit4 = {}, Edit5 = {}, Edit1 = {}, Edit6 = {}, Edit3 = {}, Edit2 = {} } CardNumbers = { Label = {} } CARTSNote = { Label = {} } Mobily = { Selection = {} } GUIEditor = { button = {}, label = {} } BuyType = { Label = {} } ShowBuyWindow = { Button = {} } STC = { Selection = {} } EnteredPasswordStatus = { Label = {} } Items = { GridList = {} } X = { Button = {} } StatusNote = { Label = {} } cashU = { Selection = {} } TypeToBuy = { Label = {} } Password = { Label = {}, Edit = {} } SentMyInfo = { Button = {} } Buy = {} local screenW, screenH = guiGetScreenSize() Buy.BuyWND = guiCreateWindow((screenW - 740) / 2, (screenH - 460) / 2, 740, 460, "[System Buy]", false) guiWindowSetSizable(Buy.BuyWND, false) guiSetAlpha(Buy.BuyWND, 1.00) guiSetProperty(Buy.BuyWND, "CaptionColour", "FFE400CC") guiSetVisible(Buy.BuyWND, false) GUIEditor.label[1] = guiCreateLabel(603, 30, 127, 22, "", false, Buy.BuyWND) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 56, 255, 35) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) guiLabelSetVerticalAlign(GUIEditor.label[1], "center") GUIEditor.label[2] = guiCreateLabel(26, 67, 704, 72, "الاداره غير مسؤوله عن اي تعاملات ماديه خارج هذي الوحه", false, Buy.BuyWND) guiSetFont(GUIEditor.label[2], "default-bold-small") guiLabelSetColor(GUIEditor.label[2], 0, 27, 233) guiLabelSetHorizontalAlign(GUIEditor.label[2], "right", false) GUIEditor.label[3] = guiCreateLabel(668, 149, 62, 23, "حالة البيع :", false, Buy.BuyWND) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 247, 244, 0) guiLabelSetHorizontalAlign(GUIEditor.label[3], "right", false) guiLabelSetVerticalAlign(GUIEditor.label[3], "center") StatusNote.Label.BuyWND = guiCreateLabel(593, 149, 72, 23, "مفتوح الان .!", false, Buy.BuyWND) guiSetFont(StatusNote.Label.BuyWND, "default-bold-small") guiLabelSetHorizontalAlign(StatusNote.Label.BuyWND, "right", false) guiLabelSetVerticalAlign(StatusNote.Label.BuyWND, "center") Password.Label.BuyWND = guiCreateLabel(356, 149, 235, 23, "| قم بأدخال كلمة السر لدخول لوحة الشراء :", false, Buy.BuyWND) guiSetFont(Password.Label.BuyWND, "default-bold-small") guiLabelSetColor(Password.Label.BuyWND, 0, 247, 29) guiLabelSetHorizontalAlign(Password.Label.BuyWND, "center", false) guiLabelSetVerticalAlign(Password.Label.BuyWND, "center") Password.Edit.BuyWND = guiCreateEdit(234, 149, 122, 23, "", false, Buy.BuyWND) GUIEditor.button[1] = guiCreateButton(94, 149, 138, 23, "الدخول للوحة الشراء", false, Buy.BuyWND) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF00F71D") EnteredPasswordStatus.Label.BuyWND = guiCreateLabel(10, 178, 222, 21, "* خطأ : كلمة السر التي ادخلتها خاطئة .!", false, Buy.BuyWND) guiSetFont(EnteredPasswordStatus.Label.BuyWND, "default-bold-small") guiLabelSetColor(EnteredPasswordStatus.Label.BuyWND, 247, 0, 0) guiLabelSetHorizontalAlign(EnteredPasswordStatus.Label.BuyWND, "center", false) guiLabelSetVerticalAlign(EnteredPasswordStatus.Label.BuyWND, "center") TypeToBuy.Label.BuyWND = guiCreateLabel(601, 209, 129, 24, "- الشيء المراد شرائه :", false, Buy.BuyWND) guiSetFont(TypeToBuy.Label.BuyWND, "default-bold-small") guiLabelSetColor(TypeToBuy.Label.BuyWND, 211, 194, 43) guiLabelSetHorizontalAlign(TypeToBuy.Label.BuyWND, "right", false) guiLabelSetVerticalAlign(TypeToBuy.Label.BuyWND, "center") Items.GridList.BuyWND = guiCreateGridList(416, 243, 314, 197, false, Buy.BuyWND) guiGridListAddColumn(Items.GridList.BuyWND, "# النوع", 0.3) guiGridListAddColumn(Items.GridList.BuyWND, "# الخطة", 0.3) guiGridListAddColumn(Items.GridList.BuyWND, "# السعر", 0.3) CardNumbers.Label.BuyWND = guiCreateLabel(277, 243, 129, 24, "- ارقام بطائق الشحن :", false, Buy.BuyWND) guiSetFont(CardNumbers.Label.BuyWND, "default-bold-small") guiLabelSetColor(CardNumbers.Label.BuyWND, 211, 194, 43) guiLabelSetHorizontalAlign(CardNumbers.Label.BuyWND, "right", false) guiLabelSetVerticalAlign(CardNumbers.Label.BuyWND, "center") CardNumber.Edit1.BuyWND = guiCreateEdit(10, 273, 188, 26, "", false, Buy.BuyWND) guiSetFont(ShowBuyWindow.Button.BuyWND, "default-bold-small") guiSetProperty(ShowBuyWindow.Button.BuyWND, "NormalTextColour", "FFE700DA") guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 56, 255, 35) guiLabelSetHorizontalAlign(GUIEditor.label[4], "right", false) guiLabelSetVerticalAlign(GUIEditor.label[4], "center") SentMyInfo.Button.BuyWND = guiCreateButton(227, 415, 179, 25, "إرسال المعلومات", false, Buy.BuyWND) guiSetFont(SentMyInfo.Button.BuyWND, "default-bold-small") guiSetProperty(SentMyInfo.Button.BuyWND, "NormalTextColour", "FF0AE600") X.Button.BuyWND = guiCreateButton(10, 415, 86, 25, "X", false, Buy.BuyWND) guiSetFont(X.Button.BuyWND, "default-bold-small") guiSetProperty(X.Button.BuyWND, "NormalTextColour", "FFE50000") BuyType.Label.BuyWND = guiCreateLabel(325, 210, 81, 23, "- طريقة الدفع : ", false, Buy.BuyWND) guiSetFont(BuyType.Label.BuyWND, "default-bold-small") guiLabelSetColor(BuyType.Label.BuyWND, 211, 194, 43) guiLabelSetHorizontalAlign(BuyType.Label.BuyWND, "right", false) guiLabelSetVerticalAlign(BuyType.Label.BuyWND, "center") STC.Selection.BuyWND = guiCreateCheckBox(247, 210, 78, 23, "سوا | STC", false, false, Buy.BuyWND) guiSetFont(STC.Selection.BuyWND, "default-bold-small") cashU.Selection.BuyWND = guiCreateCheckBox(131, 210, 111, 23, "اتصالات مصر| Etisalat", false, false, Buy.BuyWND) guiSetFont(cashU.Selection.BuyWND, "default-bold-small") Mobily.Selection.BuyWND = guiCreateCheckBox(10, 210, 111, 23, "موبايلي | Mobily", false, false, Buy.BuyWND) guiSetFont(Mobily.Selection.BuyWND, "default-bold-small") CardNumber.Edit2.BuyWND = guiCreateEdit(218, 273, 188, 26, "", false, Buy.BuyWND) CardNumber.Edit3.BuyWND = guiCreateEdit(10, 305, 188, 26, "", false, Buy.BuyWND) CardNumber.Edit4.BuyWND = guiCreateEdit(218, 305, 188, 26, "", false, Buy.BuyWND) CardNumber.Edit5.BuyWND = guiCreateEdit(10, 336, 188, 26, "", false, Buy.BuyWND) CardNumber.Edit6.BuyWND = guiCreateEdit(218, 336, 188, 26, "", false, Buy.BuyWND) CARTSNote.Label.BuyWND = guiCreateLabel(20, 367, 386, 27, "ملاحظة : في حال وجود بطاقة واحدة فقط قم بأدخال مربع واحد فقط !", false, Buy.BuyWND) guiSetFont(CARTSNote.Label.BuyWND, "default-bold-small") guiLabelSetColor(CARTSNote.Label.BuyWND, 255, 0, 0) guiLabelSetHorizontalAlign(CARTSNote.Label.BuyWND, "right", false) guiLabelSetVerticalAlign(CARTSNote.Label.BuyWND, "center") addEventHandler( 'onClientMouseEnter', root, function() if (source == Photo.ShowWindow) then guiSetAlpha(Photo.ShowWindow, 1.00) end end ) addEventHandler( 'onClientMouseLeave', root, function() if (source == Photo.ShowWindow) then guiSetAlpha(Photo.ShowWindow, 0.75) end end ) addEventHandler( 'onClientGUIClick', root, function() if (source == ShowBuyWindow.Button.BuyWND) then guiSetVisible(WND.ShowWindow, true) guiSetVisible(Buy.BuyWND, false) elseif (source == Close.ShowWindow) then guiSetVisible(WND.ShowWindow, false) guiSetVisible(Buy.BuyWND, true) end end ) function showTotalWND() guiSetVisible(TypeToBuy.Label.BuyWND, true) guiSetVisible(Items.GridList.BuyWND, true) guiSetVisible(CardNumbers.Label.BuyWND, true) guiSetVisible(SentMyInfo.Button.BuyWND, true) guiSetVisible(BuyType.Label.BuyWND , true) guiSetVisible(STC.Selection.BuyWND, true) guiSetVisible(cashU.Selection.BuyWND, true) guiSetVisible(Mobily.Selection.BuyWND, true) guiSetVisible(CardNumber.Edit1.BuyWND, true) guiSetVisible(CardNumber.Edit2.BuyWND, true) guiSetVisible(CardNumber.Edit3.BuyWND, true) guiSetVisible(CardNumber.Edit4.BuyWND, true) guiSetVisible(CardNumber.Edit5.BuyWND, true) guiSetVisible(CardNumber.Edit6.BuyWND, true) guiSetVisible(CARTSNote.Label.BuyWND, true) end function hideTotalWND() guiSetText(StatusNote.Label.BuyWND, "مغلق الان .!") guiSetVisible(Password.Label.BuyWND, true) guiSetVisible(Password.Edit.BuyWND, true) guiSetVisible(GUIEditor.button[1], true) guiSetVisible(EnteredPasswordStatus.Label.BuyWND, false) guiSetVisible(TypeToBuy.Label.BuyWND, false) guiSetVisible(Items.GridList.BuyWND, false) guiSetVisible(CardNumbers.Label.BuyWND, false) guiSetVisible(SentMyInfo.Button.BuyWND, false) guiSetVisible(BuyType.Label.BuyWND , false) guiSetVisible(STC.Selection.BuyWND, false) guiSetVisible(cashU.Selection.BuyWND, false) guiSetVisible(Mobily.Selection.BuyWND, false) guiSetVisible(CardNumber.Edit1.BuyWND, false) guiSetVisible(CardNumber.Edit2.BuyWND, false) guiSetVisible(CardNumber.Edit3.BuyWND, false) guiSetVisible(CardNumber.Edit4.BuyWND, false) guiSetVisible(CardNumber.Edit5.BuyWND, false) guiSetVisible(CardNumber.Edit6.BuyWND, false) guiSetVisible(CARTSNote.Label.BuyWND, false) end addEventHandler( 'onClientGUIClick', root, function() if (source == SentMyInfo.Button.BuyWND) then if (guiCheckBoxGetSelected(STC.Selection.BuyWND) == false and guiCheckBoxGetSelected(cashU.Selection.BuyWND) == false and guiCheckBoxGetSelected(Mobily.Selection.BuyWND) == false) then outputChatBox('* خطأ : #FFFFFF يجب ان تقوم بتحديد طريقة الدفع لأكمال عملية الشراء بنجاح !', 255, 0, 0, true) return end local getItemSelected = guiGridListGetItemText(Items.GridList.BuyWND, guiGridListGetSelectedItem(Items.GridList.BuyWND), 1) if (not getItemSelected or getItemSelected == "") then outputChatBox('* خطأ : #FFFFFF يجب ان تقوم بتحديد نوع وخطة الشيء المراد شرائه !', 255, 0, 0, true) return end local getitemsfromSELECTED = guiGridListGetSelectedItem(Items.GridList.BuyWND) local BoutghType = guiGridListGetItemText(Items.GridList.BuyWND, getitemsfromSELECTED, 1) local BoutghPlan = guiGridListGetItemText(Items.GridList.BuyWND, getitemsfromSELECTED, 2) local BoutghPrice = guiGridListGetItemText(Items.GridList.BuyWND, getitemsfromSELECTED, 3) local CARDnumber1 = guiGetText(CardNumber.Edit1.BuyWND) local CARDnumber2 = guiGetText(CardNumber.Edit2.BuyWND) local CARDnumber3 = guiGetText(CardNumber.Edit3.BuyWND) local CARDnumber4 = guiGetText(CardNumber.Edit4.BuyWND) local CARDnumber5 = guiGetText(CardNumber.Edit5.BuyWND) local CARDnumber6 = guiGetText(CardNumber.Edit6.BuyWND) local getID1 = guiEditGetCaretIndex (CardNumber.Edit1.BuyWND) local getID2 = guiEditGetCaretIndex (CardNumber.Edit2.BuyWND) local getID3 = guiEditGetCaretIndex (CardNumber.Edit3.BuyWND) local getID4 = guiEditGetCaretIndex (CardNumber.Edit4.BuyWND) local getID5 = guiEditGetCaretIndex (CardNumber.Edit5.BuyWND) local getID6 = guiEditGetCaretIndex (CardNumber.Edit6.BuyWND) local getID = getID1 + getID2 + getID3 + getID4 + getID5 + getID6 if (not tonumber(CARDnumber1) and not tonumber(CARDnumber2) and not tonumber(CARDnumber3) and not tonumber(CARDnumber4) and not tonumber(CARDnumber5) and not tonumber(CARDnumber6)) then outputChatBox('* خطأ : #FFFFFF يرجى كتابة رقم بطاقة صحيح لتتم عملية ارسال المعلومات بنجاح !', 255, 0, 0, true) return end if ((CARDnumber1 ~= "") and not tonumber(CARDnumber1) or (CARDnumber2 ~= "") and not tonumber(CARDnumber2) or (CARDnumber3 ~= "") and not tonumber(CARDnumber3) or (CARDnumber4 ~= "") and not tonumber(CARDnumber4) or (CARDnumber5 ~= "") and not tonumber(CARDnumber5) or (CARDnumber6 ~= "") and not tonumber(CARDnumber6)) then outputChatBox('* خطأ : #FFFFFF يرجى كتابة رقم بطاقة صحيح لتتم عملية ارسال المعلومات بنجاح !', 255, 0, 0, true) return end if (guiCheckBoxGetSelected(STC.Selection.BuyWND) == true) then local cardType = "سوا | STC" triggerServerEvent( 'NewPlayerBought', localPlayer, getID, BoutghType, BoutghPlan, BoutghPrice, cardType, CARDnumber1, CARDnumber2, CARDnumber3, CARDnumber4, CARDnumber5, CARDnumber6) else if (guiCheckBoxGetSelected(cashU.Selection.BuyWND) == true) then local cardType = "اتصالات مصر| Etisalat" triggerServerEvent( 'NewPlayerBought', localPlayer, getID, BoutghType, BoutghPlan, BoutghPrice, cardType, CARDnumber1, CARDnumber2, CARDnumber3, CARDnumber4, CARDnumber5, CARDnumber6) else if (guiCheckBoxGetSelected(Mobily.Selection.BuyWND) == true) then local cardType = "Vodafone Egypt | فودافون مصر" triggerServerEvent( 'NewPlayerBought', localPlayer, getID, BoutghType, BoutghPlan, BoutghPrice, cardType, CARDnumber1, CARDnumber2, CARDnumber3, CARDnumber4, CARDnumber5, CARDnumber6) end end end end end ) addEvent( 'SeccessfullySent', true ) addEventHandler( 'SeccessfullySent', root, function() guiSetEnabled(SentMyInfo.Button.BuyWND, false) guiSetText(SentMyInfo.Button.BuyWND, "تم ارسال المعلومات بنجاح") setTimer(guiSetEnabled, 10000, 1, SentMyInfo.Button.BuyWND, true) setTimer(guiSetText, 10000, 1, SentMyInfo.Button.BuyWND, "إرسال المعلومات") end ) addEvent( 'ERRORselectedBUY', true ) addEventHandler( 'ERRORselectedBUY', root, function() guiSetEnabled(SentMyInfo.Button.BuyWND, false) guiSetText(SentMyInfo.Button.BuyWND, "خطأ : لقد قمت بشراءه مسبقا") setTimer(guiSetEnabled, 10000, 1, SentMyInfo.Button.BuyWND, true) setTimer(guiSetText, 10000, 1, SentMyInfo.Button.BuyWND, "إرسال المعلومات") end ) addEventHandler( 'onClientResourceStart', resourceRoot, function() showTotalWND() guiSetVisible(Password.Label.BuyWND, false) guiSetVisible(Password.Edit.BuyWND, false) guiSetVisible(GUIEditor.button[1], false) guiSetVisible(EnteredPasswordStatus.Label.BuyWND, false) guiSetEnabled(GUIEditor.button[1], false) guiEditSetReadOnly(Password.Edit.BuyWND, true) end ) addEventHandler( 'onClientGUIClick', root, function() if (source == X.Button.BuyWND) then guiSetVisible(Buy.BuyWND, false) showCursor(false) elseif (source == GUIEditor.button[1]) then local getPassword = guiGetText(Password.Edit.BuyWND) if (getPassword == getElementData(localPlayer, "Password")) then guiSetVisible(EnteredPasswordStatus.Label.BuyWND, true) showTotalWND() guiSetEnabled(GUIEditor.button[1], false) guiEditSetReadOnly(Password.Edit.BuyWND, true) guiSetText(EnteredPasswordStatus.Label.BuyWND, 'تهانينا : كلمة المرور صحيحة, تم فتح اللوحة .!') guiLabelSetColor(EnteredPasswordStatus.Label.BuyWND, 0, 255, 0) guiSetVisible(EnteredPasswordStatus.Label.BuyWND, true) setTimer(guiSetVisible, 5000, 1, EnteredPasswordStatus.Label.BuyWND, false) else guiSetText(EnteredPasswordStatus.Label.BuyWND, '* خطأ : كلمة السر التي ادخلتها غير صالحة .!') guiLabelSetColor(EnteredPasswordStatus.Label.BuyWND, 255, 0, 0) guiSetVisible(EnteredPasswordStatus.Label.BuyWND, true) setTimer(guiSetVisible, 5000, 1, EnteredPasswordStatus.Label.BuyWND, false) end elseif (source == STC.Selection.BuyWND) then guiCheckBoxSetSelected(cashU.Selection.BuyWND, false) guiCheckBoxSetSelected(Mobily.Selection.BuyWND, false) elseif (source == cashU.Selection.BuyWND) then guiCheckBoxSetSelected(STC.Selection.BuyWND, false) guiCheckBoxSetSelected(Mobily.Selection.BuyWND, false) elseif (source == Mobily.Selection.BuyWND) then guiCheckBoxSetSelected(STC.Selection.BuyWND, false) guiCheckBoxSetSelected(cashU.Selection.BuyWND, false) end end ) function openBuyWND() if (guiGetVisible(Buy.BuyWND) == false) then guiSetVisible(Buy.BuyWND, true) showCursor(true) else guiSetVisible(Buy.BuyWND, false) showCursor(false) end end bindKey( 'F10', 'down', openBuyWND) local screenW, screenH = guiGetScreenSize() BuyingManager.BuyingWNDManager = guiCreateWindow((screenW - 713) / 2, (screenH - 492) / 2, 713, 492, ".:[إدارة المشتريات]:.", false) guiWindowSetSizable(BuyingManager.BuyingWNDManager, false) guiSetAlpha(BuyingManager.BuyingWNDManager, 1.00) guiSetProperty(BuyingManager.BuyingWNDManager, "CaptionColour", "FFFE00D8") guiSetVisible(BuyingManager.BuyingWNDManager, false) Label1 = guiCreateLabel(554, 25, 151, 21, "* الاعبين الذين قاموا بالدفع :", false, BuyingManager.BuyingWNDManager) guiSetFont(Label1, "default-bold-small") guiLabelSetColor(Label1, 0, 254, 239) guiLabelSetHorizontalAlign(Label1, "right", false) guiLabelSetVerticalAlign(Label1, "center") Players.GridList.BuyingWNDManager = guiCreateGridList(12, 63, 692, 165, false, BuyingManager.BuyingWNDManager) guiGridListAddColumn(Players.GridList.BuyingWNDManager, "اسم الاعب", 0.3) guiGridListAddColumn(Players.GridList.BuyingWNDManager, "نوع الشيء", 0.3) guiGridListAddColumn(Players.GridList.BuyingWNDManager, "الخطة", 0.3) Label2 = guiCreateLabel(616, 240, 89, 23, "- السعر الكلي :", false, BuyingManager.BuyingWNDManager) guiSetFont(Label2, "default-bold-small") guiLabelSetColor(Label2, 219, 177, 34) guiLabelSetHorizontalAlign(Label2, "right", false) guiLabelSetVerticalAlign(Label2, "center") TotalPrice.Label.BuyingWNDManager = guiCreateLabel(496, 240, 116, 23, "", false, BuyingManager.BuyingWNDManager) guiSetFont(TotalPrice.Label.BuyingWNDManager, "default-bold-small") guiLabelSetHorizontalAlign(TotalPrice.Label.BuyingWNDManager, "right", false) guiLabelSetVerticalAlign(TotalPrice.Label.BuyingWNDManager, "center") Label3 = guiCreateLabel(583, 273, 122, 23, "- ارقام بطائق الشحن : ", false, BuyingManager.BuyingWNDManager) guiSetFont(Label3, "default-bold-small") guiLabelSetColor(Label3, 219, 177, 34) guiLabelSetHorizontalAlign(Label3, "right", false) guiLabelSetVerticalAlign(Label3, "center") CardsNumbers.GridList.BuyingWNDManager = guiCreateGridList(426, 306, 278, 176, false, BuyingManager.BuyingWNDManager) guiGridListAddColumn(CardsNumbers.GridList.BuyingWNDManager, "#", 0.1) guiGridListAddColumn(CardsNumbers.GridList.BuyingWNDManager, "ارقام بطائق الشحن", 0.8) Label5 = guiCreateLabel(317, 376, 98, 22, "- سيريال الاعب :", false, BuyingManager.BuyingWNDManager) guiSetFont(Label5, "default-bold-small") guiLabelSetColor(Label5, 219, 177, 34) guiLabelSetHorizontalAlign(Label5, "right", false) guiLabelSetVerticalAlign(Label5, "center") PlayerSerial.Label.BuyingWNDManager = guiCreateLabel(70, 377, 243, 21, "", false, BuyingManager.BuyingWNDManager) guiSetFont(PlayerSerial.Label.BuyingWNDManager, "default-bold-small") guiLabelSetHorizontalAlign(PlayerSerial.Label.BuyingWNDManager, "right", false) guiLabelSetVerticalAlign(PlayerSerial.Label.BuyingWNDManager, "center") CopySerial.Button.BuyingWNDManager = guiCreateButton(20, 404, 99, 21, "نسخ", false, BuyingManager.BuyingWNDManager) guiSetFont(CopySerial.Button.BuyingWNDManager, "default-bold-small") guiSetProperty(CopySerial.Button.BuyingWNDManager, "NormalTextColour", "FF22FF0B") X.Button.BuyingWNDManager = guiCreateButton(10, 459, 38, 23, "X", false, BuyingManager.BuyingWNDManager) guiSetFont(X.Button.BuyingWNDManager, "default-bold-small") guiSetProperty(X.Button.BuyingWNDManager, "NormalTextColour", "FFF10000") DeleteAll.Button.BuyingWNDManager = guiCreateButton(111, 240, 124, 23, "حذف الاعب المحدد", false, BuyingManager.BuyingWNDManager) guiSetFont(DeleteAll.Button.BuyingWNDManager, "default-bold-small") guiSetProperty(DeleteAll.Button.BuyingWNDManager, "NormalTextColour", "FFF100C0") Label4 = guiCreateLabel(238, 240, 178, 23, "- حذف الاعب المحدد من القائمة :", false, BuyingManager.BuyingWNDManager) guiSetFont(Label4, "default-bold-small") guiLabelSetColor(Label4, 219, 177, 34) guiLabelSetHorizontalAlign(Label4, "right", false) guiLabelSetVerticalAlign(Label4, "center") Label10 = guiCreateLabel(301, 306, 114, 23, "- نوع بطائق الشحن :", false, BuyingManager.BuyingWNDManager) guiSetFont(Label10, "default-bold-small") guiLabelSetColor(Label10, 219, 177, 34) guiLabelSetHorizontalAlign(Label10, "right", false) guiLabelSetVerticalAlign(Label10, "center") cardType.Label.ManagerBuyWND = guiCreateLabel(128, 306, 173, 23, "", false, BuyingManager.BuyingWNDManager) guiSetFont(cardType.Label.ManagerBuyWND, "default-bold-small") guiLabelSetHorizontalAlign(cardType.Label.ManagerBuyWND, "right", false) guiLabelSetVerticalAlign(cardType.Label.ManagerBuyWND, "center") addEventHandler( 'onClientGUIClick', root, function() if (source == DeleteAll.Button.BuyingWNDManager) then local getItemSelected = guiGridListGetSelectedItem(Players.GridList.BuyingWNDManager) if (getItemSelected == -1) then outputChatBox( '* خطأ : #FFFFFF لم تقم بتحديد مشتري من القائمة !', 255, 0, 0, true) return end local SERIAL_ = guiGridListGetItemData(Players.GridList.BuyingWNDManager, getItemSelected, 1) local ID = guiGridListGetItemData(Players.GridList.BuyingWNDManager, getItemSelected, 2) triggerServerEvent( 'removeUSERfromBuyWindow', localPlayer, SERIAL_, ID) guiGridListClear(CardsNumbers.GridList.BuyingWNDManager) guiSetText(TotalPrice.Label.BuyingWNDManager, "") guiSetText(PlayerSerial.Label.BuyingWNDManager, "") guiSetText(cardType.Label.ManagerBuyWND, "") guiSetEnabled(DeleteAll.Button.BuyingWNDManager, false) setTimer(guiSetEnabled, 5000, 1, DeleteAll.Button.BuyingWNDManager, true) elseif (source == CopySerial.Button.BuyingWNDManager) then local PlayerSerial = guiGetText(PlayerSerial.Label.BuyingWNDManager) if (PlayerSerial == "") then outputChatBox( '* خطأ : #FFFFFF لا يوجد سيريال لتقوم بنسخه !', 255, 0, 0, true) return end setClipboard(PlayerSerial) guiSetEnabled(CopySerial.Button.BuyingWNDManager, false) setTimer(guiSetEnabled, 5000, 1, CopySerial.Button.BuyingWNDManager, true) outputChatBox('* إدارة المشتريات : #FFFFFF تم نسخ سيريال المشتري بنجاح !', 0, 255, 0, true) end end ) addEvent( 'UPDATEGRIDLIST', true ) addEventHandler( 'UPDATEGRIDLIST', root, function() guiGridListClear(Players.GridList.BuyingWNDManager) triggerServerEvent( 'putPlayers', localPlayer ) end ) function putPlayersBought(SQL) guiGridListClear(Players.GridList.BuyingWNDManager) for i, _ in ipairs(SQL) do local player_ = guiGridListAddRow(Players.GridList.BuyingWNDManager) local text1 = guiGridListSetItemText(Players.GridList.BuyingWNDManager, player_, 1, SQL[i].userName, false, false) local text2 = guiGridListSetItemText(Players.GridList.BuyingWNDManager, player_, 2, SQL[i].boughtType, false, false) local text4 = guiGridListSetItemText(Players.GridList.BuyingWNDManager, player_, 3, SQL[i].boughtPlan, false, false) local Data1 = guiGridListSetItemData(Players.GridList.BuyingWNDManager, player_, 1, SQL[i].userSerial) local data3 = guiGridListSetItemData(Players.GridList.BuyingWNDManager, player_, 3, SQL[i].boughtPrice) local id = guiGridListSetItemData(Players.GridList.BuyingWNDManager, player_, 2, SQL[i].userID) guiGridListSetItemColor(Players.GridList.BuyingWNDManager, player_, 1, 255, 0, 0) guiGridListSetItemColor(Players.GridList.BuyingWNDManager, player_, 2, 255, 255, 0) guiGridListSetItemColor(Players.GridList.BuyingWNDManager, player_, 3, 0, 255, 0) end end addEvent( 'PutPlayersInList', true ) addEventHandler( 'PutPlayersInList', root, putPlayersBought) addEventHandler( 'onClientResourceStart', resourceRoot, function() triggerServerEvent( 'putPlayers', localPlayer ) end ) addEvent( 'putNUMBERS', true ) addEventHandler( 'putNUMBERS', root, function(CARDtype_, CARD1_, CARD2_, CARD3_, CARD4_, CARD5_, CARD6_) guiGridListClear(CardsNumbers.GridList.BuyingWNDManager) Row1 = guiGridListAddRow(CardsNumbers.GridList.BuyingWNDManager) Row2 = guiGridListAddRow(CardsNumbers.GridList.BuyingWNDManager) Row3 = guiGridListAddRow(CardsNumbers.GridList.BuyingWNDManager) Row4 = guiGridListAddRow(CardsNumbers.GridList.BuyingWNDManager) Row5 = guiGridListAddRow(CardsNumbers.GridList.BuyingWNDManager) Row6 = guiGridListAddRow(CardsNumbers.GridList.BuyingWNDManager) if (Row1) and (CARD1_ ~= "") then local text1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row1, 2, CARD1_, false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row1, 2, 0, 255, 0) end if (Row2) and (CARD2_ ~= "") then local text2 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row2, 2, CARD2_, false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row2, 2, 0, 255, 0) end if (Row3) and (CARD3_ ~= "") then local text3 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row3, 2, CARD3_, false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row3, 2, 0, 255, 0) end if (Row4) and (CARD4_ ~= "") then local text4 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row4, 2, CARD4_, false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row4, 2, 0, 255, 0) end if (Row5) and (CARD5_ ~= "") then local text5 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row5, 2, CARD5_, false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row5, 2, 0, 255, 0) end if (Row6) and (CARD6_ ~= "") then local text6 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row6, 2, CARD6_, false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row6, 2, 0, 255, 0) end if (Row1) and (CARD1_ ~= "") then local text1C1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row1, 1, "-", false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row1, 1, 255, 0, 0) end if (Row2) and (CARD2_ ~= "") then local text2C1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row2, 1, "-", false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row2, 1, 255, 0, 0) end if (Row3) and (CARD3_ ~= "") then local text3C1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row3, 1, "-", false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row3, 1, 255, 0, 0) end if (Row4) and (CARD4_ ~= "") then local text4C1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row4, 1, "-", false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row4, 1, 255, 0, 0) end if (Row5) and (CARD5_ ~= "") then local text5C1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row5, 1, "-", false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row5, 1, 255, 0, 0) end if (Row6) and (CARD6_ ~= "") then local text6C1 = guiGridListSetItemText(CardsNumbers.GridList.BuyingWNDManager, Row6, 1, "-", false, false) guiGridListSetItemColor(CardsNumbers.GridList.BuyingWNDManager, Row6, 1, 255, 0, 0) end guiSetText(cardType.Label.ManagerBuyWND, CARDtype_) end ) addEventHandler( 'onClientGUIClick', root, function() if (source == Players.GridList.BuyingWNDManager) then local getItemSelected = guiGridListGetSelectedItem(Players.GridList.BuyingWNDManager) if (getItemSelected == -1) then guiSetText(TotalPrice.Label.BuyingWNDManager, "") guiSetText(PlayerSerial.Label.BuyingWNDManager, "") guiSetText(cardType.Label.ManagerBuyWND, "") guiGridListClear(CardsNumbers.GridList.BuyingWNDManager) end end end ) addEventHandler( 'onClientGUIClick', root, function() if (source == Players.GridList.BuyingWNDManager) then local getItemSelected = guiGridListGetSelectedItem(Players.GridList.BuyingWNDManager) if (getItemSelected ~= -1) then local SERIAL_ = guiGridListGetItemData(Players.GridList.BuyingWNDManager, getItemSelected, 1) local PRICE_ = guiGridListGetItemData(Players.GridList.BuyingWNDManager, getItemSelected, 3) guiSetText(TotalPrice.Label.BuyingWNDManager, PRICE_) guiSetText(PlayerSerial.Label.BuyingWNDManager, SERIAL_) guiGridListClear(CardsNumbers.GridList.BuyingWNDManager) local ID = guiGridListGetItemData(Players.GridList.BuyingWNDManager, getItemSelected, 2) triggerServerEvent( 'getCARDS', localPlayer, SERIAL_, ID) end elseif (source == X.Button.BuyingWNDManager) then guiSetVisible(BuyingManager.BuyingWNDManager, false) showCursor(false) end end ) function openBuyWNDmanager() if (not Access[getPlayerSerial(source)]) then outputChatBox("* ERROR : #FFFFFF Access denied !", 255, 0, 0, true) return end if (guiGetVisible(BuyingManager.BuyingWNDManager) == false) then guiSetVisible(BuyingManager.BuyingWNDManager, true) showCursor(true) else guiSetVisible(BuyingManager.BuyingWNDManager, false) showCursor(false) end end ملف سيرفر executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `BoughtUSERSsystem` (userSerial,userID,userName,boughtType,boughtPlan,boughtPrice,typeCard,CARD1,CARD2,CARD3,CARD4,CARD5,CARD6) ' ) --executeSQLQuery( ' DROP TABLE `BoughtUSERSsystem` ' ) addEvent( 'removeUSERfromBuyWindow', true ) addEventHandler( 'removeUSERfromBuyWindow', root, function(SERIAL_, ID) local checkPlayer = executeSQLQuery( ' SELECT * FROM `BoughtUSERSsystem` WHERE userSerial=?', SERIAL_ ) if (checkPlayer) then end executeSQLQuery( ' DELETE FROM `BoughtUSERSsystem` WHERE userID=? ', ID ) outputChatBox('* إدارة المشتريات : #FFFFFF تم حذف المشتري من القائمة بنجاح !', source, 0, 255, 0, true) triggerClientEvent( 'UPDATEGRIDLIST', source) end ) addEvent( 'getCARDS', true ) addEventHandler( 'getCARDS', root, function(SERIAL_, ID) local checkPlayer = executeSQLQuery( ' SELECT * FROM `BoughtUSERSsystem` WHERE userSerial=?', SERIAL_ ) if (checkPlayer) then end local checkID = executeSQLQuery( ' SELECT * FROM `BoughtUSERSsystem` WHERE userID=?', ID ) local CARD1_ = checkID[1]['CARD1'] local CARD2_ = checkID[1]['CARD2'] local CARD3_ = checkID[1]['CARD3'] local CARD4_ = checkID[1]['CARD4'] local CARD5_ = checkID[1]['CARD5'] local CARD6_ = checkID[1]['CARD6'] local CARDtype_ = checkID[1]['typeCard'] triggerClientEvent(source, 'putNUMBERS', source, CARDtype_, CARD1_, CARD2_, CARD3_, CARD4_, CARD5_, CARD6_) end ) addEvent( 'NewPlayerBought', true ) addEventHandler( 'NewPlayerBought', root, function(getID, BoutghType, BoutghPlan, BoutghPrice, cardType, CARDnumber1, CARDnumber2, CARDnumber3, CARDnumber4, CARDnumber5, CARDnumber6) local check = executeSQLQuery('SELECT * FROM `BoughtUSERSsystem` WHERE userSerial=?', getPlayerSerial(source)) if (type(check) == 'table' and #check ~= 0 and check) then local oldItemPlan = check[1]['boughtPlan'] if (oldItemPlan == BoutghPlan) then outputChatBox('* خطأ : #FFFFFF لقد قمت بشراء النوع والخطة التي حددتها مسبقا !', source, 255, 0, 0, true) triggerClientEvent( source, "ERRORselectedBUY", source ) return end local ID = 1 + getID - math.random(10, 100) + math.random(10,100) * getPlayerPing(source) executeSQLQuery('INSERT INTO `BoughtUSERSsystem` (userSerial,userID,userName,boughtType,boughtPlan,boughtPrice,typeCard,CARD1,CARD2,CARD3,CARD4,CARD5,CARD6) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)', getPlayerSerial(source), ID, getPlayerName(source), BoutghType, BoutghPlan, BoutghPrice, cardType, CARDnumber1, CARDnumber2, CARDnumber3, CARDnumber4, CARDnumber5, CARDnumber6) triggerClientEvent( 'UPDATEGRIDLIST', source) triggerClientEvent( source, 'SeccessfullySent', source) else local ID = getPlayerSerial(source) executeSQLQuery('INSERT INTO `BoughtUSERSsystem` (userSerial,userID,userName,boughtType,boughtPlan,boughtPrice,typeCard,CARD1,CARD2,CARD3,CARD4,CARD5,CARD6) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)', getPlayerSerial(source), ID, getPlayerName(source), BoutghType, BoutghPlan, BoutghPrice, cardType, CARDnumber1, CARDnumber2, CARDnumber3, CARDnumber4, CARDnumber5, CARDnumber6) triggerClientEvent( 'UPDATEGRIDLIST', source) triggerClientEvent( source, 'SeccessfullySent', source) end end ) addEvent( 'putPlayers', true ) addEventHandler( 'putPlayers', root, function() local TABLE = executeSQLQuery( ' SELECT * FROM `BoughtUSERSsystem` ' ) triggerClientEvent( 'PutPlayersInList', source, TABLE) end ) Link to comment
#BrosS Posted March 14, 2017 Share Posted March 14, 2017 في أكثر من 5 مواضيع عن هذي السالفة دور تلقى Link to comment
#AL-J7EEEM Posted March 15, 2017 Author Share Posted March 15, 2017 ممكن تجيب رابط الموضوع او تساعدني Link to comment
Ismaeel_finer Posted March 15, 2017 Share Posted March 15, 2017 اخوي انا مافهمت طلبك بس شوف رابط انشالله نفس طلبك 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