#AL-J7EEEM

Members
  • Content count

    98
  • Joined

  • Last visited

Community Reputation

2 Neutral

About #AL-J7EEEM

  • Rank
    Punk-@ss B*tch
  1. [Help] in Grid List

    Hi, I have a problem with my script. The problem is that I have created a GirdList that shows the accounts that are registered and the specific data. But now nothing appears and the window does not open. -Server Table = { Commands = { WindowOpen = 'dmanager' -- أمر فتح اللوحة } , Accounts = { -- أسماء حساباتك 'goda' , '' , '' , '' , '' } , } addCommandHandler ( Table.Commands.WindowOpen , function ( Player ) local Account = getPlayerAccount ( Player ) if ( isGuestAccount ( Account ) ) then return end local Name = getAccountName ( Account ) for _ , v in ipairs ( Table.Accounts ) do if ( Name == v ) then triggerClientEvent ( Player , 'OpenWnd' , Player ) outputChatBox ( '*Welcome Manager' , Player ) end end end ) addEvent( "showchatdata",true ) addEventHandler( "showchatdata",root, function() for i,player in ipairs(getElementsByType("player")) do local data = getElementData( player,'playerDiamond' ) local acc =getPlayerAccount( player ) if not isGuestAccount( acc ) then if data then outputChatBox('#FFFFFFAccount#FF0000 ['..getAccountName(acc)..'] #00FFFFDiamond#FFFFFF '..data..' .',root,255,255,255,true) else outputChatBox('Player is not logged in !',root,255,0,0,true) end end end end) addEvent ( 'onTriggerGetAccounts' , true ) addEventHandler ( 'onTriggerGetAccounts' , root , function ( ) local Accounts = { } for _ , v in ipairs ( getAccounts ) do local Name = getAccountName ( v ) local Serial = getAccountsSerial ( Name ) table.insert ( Accounts , { Name , Serial } ) triggerClientEvent ( source , 'onTriggerGiveAccount' , source , Accounts ) end end ) ----------------------------------------------- function onStart ( ) players = getElementsByType('player') for index,values in ipairs ( players ) do setElementData ( values , 'playerDiamond' , getElementData ( values , 'playerDiamond' ) or 0 ) end end addEventHandler('onResourceStart',resourceRoot,onStart) function getPlayerDiamond ( player ) if ( getElementType ( player ) ~= 'player' ) then return false end return getElementData ( player , 'playerDiamond' ) or 0 end function takePlayerDiamond ( player , amount ) if ( getElementType ( player ) ~= 'player' and type ( amount ) ~= 'number' ) then return false end setElementData ( player , 'playerDiamond' , getPlayerDiamond ( player ) - amount or 0 ) end function setPlayerDiamond ( player , amount ) if ( getElementType ( player ) ~= 'player' and type ( amount ) ~= 'number' ) then return false end setElementData ( player , 'playerDiamond' , getPlayerDiamond ( player ) + amount or 0 ) end --------------- addEventHandler('onPlayerJoin',root, function ( ) setElementData ( source , 'playerDiamond' , 0) end ) addEventHandler('onPlayerQuit',root, function ( ) local acc = getPlayerAccount ( source ) if ( not isGuestAccount ( acc ) ) then setAccountData ( acc , 'Save:playerDiamond' , getElementData ( source , 'playerDiamond' ) or 0 ) end end ) addEventHandler('onPlayerLogin',root, function (_,acc) local accD = getAccountData ( acc , 'Save:playerDiamond' ) if ( accD ) then setElementData ( source , 'Diamond' , accD ) else setElementData ( source , 'Diamond' , 0) end end ) ------------------------- addEvent('onSetDiamond',true) addEventHandler('onSetDiamond',root, function ( player , di ) if ( getAccountName ( player ) ) then if ( tonumber ( di ) ) then setPlayerDiamond ( getAccountName ( player ) , tonumber ( di ) or 0 ) setAccountData ( getPlayerAccount(getAccountName(player)) , 'Save:playerDiamond' , getElementData ( getAccountName(player) , 'playerDiamond' ) ) outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 You Have Been Give Diamond',source,255,255,255,true) else outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 Please Write Number only',source,255,255,255,true) end end end ) addEvent('onTakeDiamond',true) addEventHandler('onTakeDiamond',root, function ( player , di ) if ( getAccountName ( player ) ) then if ( tonumber ( di ) ) then if ( getPlayerDiamond ( getAccountName ( player ) ) > 1 ) then setAccountData ( getPlayerAccount(getAccountName(player)) , 'Save:playerDiamond' , getElementData ( getAccountName(player) , 'playerDiamond' ) ) takePlayerDiamond ( getAccountName ( player ) , tonumber ( di ) or 0 ) outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 You Have Been Take Diamond',source,255,255,255,true) else outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 This Player Dont Have Diamond ',source,255,255,255,true) end else outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 Please Write Number only',source,255,255,255,true) end end end ) addEventHandler('onPlayerLogout',root, function ( ) setElementData ( source , 'playerDiamond' , 0) end) -Client GUIEditor = { gridlist = {}, window = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() EVOD = guiCreateWindow(147, 86, 535, 417, "[Diamond Manager] [V1]", false) guiWindowSetSizable(EVOD, false) guiSetAlpha(EVOD, 1.00) guiSetVisible(EVOD, false) List = guiCreateGridList(43, 49, 238, 332, false, EVOD) GUIEditor.staticimage[1] = guiCreateStaticImage(20, 33, 280, 16, "IMG1.png", false, EVOD) column1(List, "Accounts", 0.3) column2(List, "Diamonds", 0.3) column3(List, "Serial", 0.3) GUIEditor.staticimage[2] = guiCreateStaticImage(281, 49, 19, 332, "IMG1.png", false, EVOD) GUIEditor.staticimage[3] = guiCreateStaticImage(20, 49, 19, 332, "IMG1.png", false, EVOD) GUIEditor.staticimage[4] = guiCreateStaticImage(20, 381, 280, 16, "IMG1.png", false, EVOD) set = guiCreateButton(435, 168, 87, 29, "Give", false, EVOD) guiSetProperty(set, "NormalTextColour", "FF04FAE6") take = guiCreateButton(435, 203, 87, 29, "Take", false, EVOD) guiSetProperty(take, "NormalTextColour", "FF04FAE6") guiEditSetReadOnly(account, true) guiEditSetReadOnly(serial, true) guiEditSetReadOnly(diamond, true) for i,v in ipairs ( getElementsByType('player') ) do local row = guiGridListAddRow ( List ) addD = guiCreateEdit(362, 169, 68, 28, "", false, EVOD) takeT = guiCreateEdit(362, 203, 68, 28, "", false, EVOD) account = guiCreateEdit(374, 52, 138, 23, "Account Name", false, EVOD) serial = guiCreateEdit(374, 80, 138, 23, "Serial", false, EVOD) diamond = guiCreateEdit(374, 108, 138, 23, "Daimond", false, EVOD) GUIEditor.staticimage[5] = guiCreateStaticImage(334, 275, 188, 132, "waitIcon.png", false, EVOD) GUIEditor.button[1] = guiCreateButton(329, 242, 193, 25, "Show All Diamond In Chat", false, EVOD) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFA6603") end end ) ------GetDataAccountSerial------ function getServerAccounts ( ) triggerServerEvent ( 'onTriggerGetAccounts' , localPlayer ) end function getAccounta ( Accounts ) guiGridListClear ( List ) for _ , v in ipairs ( player ) do Row = guiGridListAddRow ( List ) guiGridListSetItemText ( List, Row, column1, v.Name , false, false ) guiGridListSetItemText( List, Row, column2, getElementData ( player, "playerDiamond" ),false,false) guiGridListSetItemText ( List, Row, column3, v.Serial , false, false ) end end addEvent ( 'onTriggerGiveAccount' , true ) addEvdntHandler ( 'onTriggerGiveAccount' , root , getAccounta ) -------------------------------------- ---OnClick--- -----ShowDiamond--- addEventHandler('onClientGUIClick',root,function() if source==show then triggerServerEvent('showchatdata',localPlayer) end end) --------------- -----Take&GiveDiamond------ addEventHandler('onClientGUIClick',root, function ( ) if ( source == set ) then if ( guiGridListGetSelectedItem ( List ) == -1 and guiGetText ( addD ) == '' ) then return outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 Please Select player or write text',255,255,255,true) end triggerServerEvent('onSetDiamond',localPlayer,guiGridListGetItemText(List,guiGridListGetSelectedItem(List),1),guiGetText(addD)) elseif ( source == take ) then if ( guiGridListGetSelectedItem ( List ) == -1 and guiGetText ( takeT ) == '' ) then return outputChatBox('#ffffff[ #f77f00Diamond-System #ffffff] #f77f00 Please Select player or write text',255,255,255,true) end triggerServerEvent('onTakeDiamond',localPlayer,guiGridListGetItemText(List,guiGridListGetSelectedItem(List),1),guiGetText(takeT)) end end ) ----------------------------- ----------CloseWindow------------ --------------------------------- -------EndOnClick----------- ---------Open----------- function setGUIvisible () local GUIvisible = ( not guiGetVisible ( EVOD ) ) guiSetVisible ( EVOD, GUIvisible ) showCursor ( GUIvisible ) getServerAccounts ( ) end addEvent( "OpenWnd", true ) addEventHandler ( "OpenWnd", root, setGUIvisible ) ------------------
  2. مشكلة بلسيرفر

    السلام عليكم اسيرفر لوحة الادمنية الريسورس الي فيها ماتشغل شي ولا تقفل شي وجربت لوحتين ونفس المشكلة السيرفر من كايرو هوست وش اسوي؟
  3. طلب فكشنات

    السلام عليكم عايز فكشنات لـ ممراقبة الشات ك مثلا يظهر اسمه وكلامه وبعدين اسم حسابه ياريت تكونو فهمتوني ..
  4. حل مشكلة ضروري

    خلاص شكرا حليتها # يغلق Thx
  5. حل لو سمحتم

    مشكور خلاص طلعت كاتب شي غلط مشكور ع المساعدة
  6. حل لو سمحتم

    لم اجي افتخ الوحة واسوي شي معين يروح يخفي لي اشياء بل جريد ليست
  7. حل لو سمحتم

    الدي بق مايقول شي المفروض الخطا بلكود حق فتح الوحة صحيح؟؟ اهو الكود function setGUIvisible () local GUIvisible = ( not guiGetVisible ( wnd ) ) guiSetVisible ( wnd, GUIvisible ) showCursor ( GUIvisible ) end addEvent( "open", true ) addEventHandler ( "open", root, setGUIvisible )
  8. حل لو سمحتم

    if name == "1" يسوي اسم الحساب اسماء الحسابات 1 - 2- 3
  9. كود

    -- Server function () if ( getPlayerAccount ( player ) ) and not isGuestAccount ( getPlayerAccount ( player ) ) then if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount ( player )),aclGetGroup ( "Console" )) then triggerClientEvent ( player, "send", player ) outputChatBox ( "", player ) end end end --Client function () addEvent("send") addEventHandler( "onClientGUIClick", root, function( ) if ( source == yourbotton ) then end end ملاحظة تاني بكتب من الجوال اكيد ممكن يكون في اخطا + مو مجرب
  10. حل لو سمحتم

    السلام عليكم الحين كنت مسوي لوحة تفتح لـ رتبة عدلتها وخليتها لحساب صار لخبطة وفي اشياء ماتظهر ف الجريد ليست الاكواد : قبل function open ( player, command ) if ( getPlayerAccount ( player ) ) and not isGuestAccount ( getPlayerAccount ( player ) ) then if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount ( player )),aclGetGroup ( "Console" )) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount ( player )),aclGetGroup ( "Admin" )) then triggerClientEvent ( player, "open", player ) else outputChatBox ( "* LOGIN [ with Concole or Admin ] First", player ) end end end الاكواد بعد : addCommandHandler("manager", function(player) local acc = getPlayerAccount ( player ) if isGuestAccount ( acc ) then return end local name = getAccountName(acc) if name == "3" or name == "2" or name == "1" then triggerClientEvent (player, "open", player) outputChatBox ( "[Welcome Manager]", player ) else outputChatBox ( "* لقد حاولت فتح لوحه ادارية تم تسجيل محاولتك", player ) end end)
  11. معندي سكايب تعرف aws amazon? انا شريت منه فبس لينكس ديبان
  12. لو سمحت واي فاي @iMr.WiFi..! انا الحين اشتريت Debian من امازون الحين ما اعطاني الا ايبي ويوزر كيف اسطبها ولا وش اسوي تسطبهالي انت؟؟
  13. تصحيح كود

    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 ) Server - كلنت - 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 getAccountName = guiGetText(PlayerSerial.Label.BuyingWNDManager) if (getAccountName == "") then outputChatBox( '* خطأ : #FFFFFF لا يوجد سيريال لتقوم بنسخه !', 255, 0, 0, true) return end setClipboard(getAccountName) 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 كلنت - 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 getAccountName = guiGetText(PlayerSerial.Label.BuyingWNDManager) if (getAccountName == "") then outputChatBox( '* خطأ : #FFFFFF لا يوجد سيريال لتقوم بنسخه !', 255, 0, 0, true) return end setClipboard(getAccountName) 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
  14. تصحيح كود

    هذا حق فتح الوحه >< يتحقق من سيريال اللاعب ويفتحها