Jump to content

N3xT

Retired Staff
  • Posts

    2,490
  • Joined

  • Days Won

    18

Everything posted by N3xT

  1. ما أستعملت اللوب أصلا بكودك, حاط التوزيع للسورس
  2. Try that, and change ( 1366, 768 ) to your screen resolution local nW,nH = guiGetScreenSize() local x, y = nW/1366,nH/768 addEventHandler("onClientRender",root, function () dxDrawText("MTA Forum", x*680, y*464, x*811, y*490, tocolor(255, 255, 255, 255), 2, "default-bold", "center", "center", false, false, true, false, false) end )
  3. ممكن أعرف وش فايدة اللوب اللي بـ السيرفر سايد ؟
  4. جانب سيرفر حقي عدله للتالي, لأن كان فيه خطأ بسيط local database = dbConnect( "sqlite", "d3m.db" ) local connect = dbExec ( database, " CREATE TABLE IF NOT EXISTS `Donator` ( playerName, price ) " ) addEvent('add:SQL:data', true ) addEventHandler('add:SQL:data' , root , function ( playerText, priceText ) if playerText and priceText then dbExec( database, ' INSERT INTO `Donator` VALUES(?,?) ', playerText, priceText ) refresh ( ) end end ) function refresh( ) local check = dbQuery( database, ' SELECT * FROM `Donator` ' ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then return end triggerClientEvent( root, 'refresh:grid', root, results ) end addEvent( 'EventS', true ) addEventHandler( 'EventS', root, refresh )
  5. تسلم ي بطل, وحياك الله بأي وقت
  6. Client serialTable = { ["D30DD1F9735A43BBD31BB15F655D5EA2"] = true, } local screenW, screenH = guiGetScreenSize() DaamWind = guiCreateWindow((screenW - 696) / 2, (screenH - 418) / 2, 696, 418, "", false) guiWindowSetSizable(DaamWind, false) guiSetAlpha(DaamWind, 1.00) guiSetVisible(DaamWind,false) Lab = guiCreateLabel(0.35, 0.08, 0.33, 0.05, "-| لوحة اعلى 30 داعم للسيرفر |-", true, DaamWind) guiSetFont(Lab, "default-bold-small") guiLabelSetColor(Lab, 13, 254, 252) DaamWin = guiCreateGridList(0.03, 0.17, 0.95, 0.61, true, DaamWind) guiSetFont( DaamWin , "default-bold-small") Row = guiGridListAddColumn(DaamWin, "اسم اللاعب", 0.5) xRow = guiGridListAddColumn(DaamWin, "المبلغ", 0.5) BTN = guiCreateButton(0.29, 0.83, 0.39, 0.09, "close|#|اغلاق", true, DaamWind) guiSetProperty(BTN, "NormalTextColour", "FF5CFE0C") LAB2 = guiCreateLabel(0.03, 0.88, 0.14, 0.05, "By Mr.Kamaro", true, DaamWind) guiSetFont(LAB2, "default-bold-small") guiLabelSetColor(LAB2, 13, 254, 252) GUIELAB3 = guiCreateLabel(0.79, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB3, "sa-header") guiLabelSetColor(GUIELAB3, 13, 254, 252) GUIELAB4 = guiCreateLabel(0.94, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB4, "sa-header") guiLabelSetColor(GUIELAB4, 254, 14, 14) GUIELAB5 = guiCreateLabel(0.86, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB5, "sa-header") guiLabelSetColor(GUIELAB5, 92, 254, 12) EdarhBTN = guiCreateButton(0.02, 0.95, 0.06, 0.03, "ادارة", true, DaamWind) EdarhWND = guiCreateWindow(0.25, 0.17, 0.24, 0.21, "ادارة اللوحة", true) guiSetVisible(EdarhWND,false) PlayerEdit = guiCreateEdit(0.03, 0.27, 0.59, 0.16, "", true, EdarhWND) PriceEdit = guiCreateEdit(0.03, 0.62, 0.59, 0.16, "", true, EdarhWND) LabPlayer = guiCreateLabel(0.02, 0.14, 0.59, 0.10, "اسم اللاعب", true, EdarhWND) guiSetFont(LabPlayer, "default-bold-small") guiLabelSetColor(LabPlayer, 0, 251, 254) guiLabelSetHorizontalAlign(LabPlayer, "center", false) guiLabelSetVerticalAlign(LabPlayer, "center") labPrice = guiCreateLabel(0.02, 0.53, 0.59, 0.10, "المبلغ", true, EdarhWND) guiSetFont(labPrice, "default-bold-small") guiLabelSetColor(labPrice, 0, 251, 254) guiLabelSetHorizontalAlign(labPrice, "center", false) guiLabelSetVerticalAlign(labPrice, "center") addData = guiCreateButton(0.63, 0.25, 0.28, 0.17, "اضافة", true, EdarhWND) --PriceSend = guiCreateButton(0.63, 0.61, 0.28, 0.17, "اضافة", true, EdarhWND) Close_Btn = guiCreateButton(0.84, 0.84, 0.13, 0.10, "X", true, EdarhWND) addCommandHandler('داعم', function() guiSetVisible(DaamWind,true) showCursor( true ) triggerServerEvent("EventS",localPlayer,localPlayer) end ) addEventHandler("onClientGUIClick", root, function ( ) if ( source == addData ) then local playerText = guiGetText(PlayerEdit) local priceText = guiGetText(PriceEdit) if ( playerText == "" ) or ( priceText == "" ) then outputChatBox("يجب كتآبة التحديث",255,255,0,true) return end triggerServerEvent ( 'add:SQL:data' , localPlayer , playerText , priceText ) triggerServerEvent("EventS",localPlayer,localPlayer) guiSetVisible ( EdarhWND , false ) guiSetVisible ( DaamWind , true ) showCursor ( true ) guiSetInputEnabled(false) guiSetText(PlayerEdit,"" ) guiSetText(PriceEdit,"" ) elseif ( source == BTN ) then guiSetVisible(DaamWind, false) showCursor(false) guiSetInputEnabled(false) elseif ( source == Close_Btn ) then guiSetVisible(EdarhWND,false) showCursor(false) elseif ( source == EdarhBTN ) then local serial = getPlayerSerial() if serialTable[serial] then guiSetVisible(EdarhWND,true) guiSetVisible(DaamWind,false) showCursor(true) end end end ) addEvent('refresh:grid' , true ) addEventHandler('refresh:grid' , root, function ( sqlTable ) if sqlTable then guiGridListClear(DaamWin) for i,v in ipairs (sqlTable) do local myRow = guiGridListAddRow ( DaamWin ) guiGridListSetItemText ( DaamWin , myRow , 1 , sqlTable[i].playerName, false , false ) guiGridListSetItemText ( DaamWin , myRow , 2 , sqlTable[i].price , false , false ) guiGridListSetItemColor ( DaamWin , myRow , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) guiGridListSetItemColor ( DaamWin , myRow , 2 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) end end end ) addEventHandler("onClientRender",root, function() if guiGetVisible(DaamWind,false) then showCursor(true) end end ) Server local database = dbConnect( "sqlite", "d3m.db" ) local connect = dbExec ( database, " CREATE TABLE IF NOT EXISTS `Donator` ( playerName, price ) " ) addEvent('add:SQL:data', true ) addEventHandler('add:SQL:data' , root , function ( playerText, priceText ) if playerText and priceText then dbExec( database, ' INSERT INTO `Donator` VALUES(?,?) ', playerText, priceText ) refresh ( client ) end end ) function refresh( client ) local check = dbQuery( database, ' SELECT * FROM `Donator` ' ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then return end triggerClientEvent( client, 'refresh:grid', client, results ) end addEvent( 'EventS', true ) addEventHandler( 'EventS', root, refresh )
  7. الحركة حقت أبو سولو تظبط, ومالها دخل بالملف هي أوامر وإستدعاء !
  8. عطني السطور اتأكد منها ؟ وجرب ذا كلينت serialTable = { ["D30DD1F9735A43BBD31BB15F655D5EA2"] = true, } local screenW, screenH = guiGetScreenSize() DaamWind = guiCreateWindow((screenW - 696) / 2, (screenH - 418) / 2, 696, 418, "", false) guiWindowSetSizable(DaamWind, false) guiSetAlpha(DaamWind, 1.00) guiSetVisible(DaamWind,false) Lab = guiCreateLabel(0.35, 0.08, 0.33, 0.05, "-| لوحة اعلى 30 داعم للسيرفر |-", true, DaamWind) guiSetFont(Lab, "default-bold-small") guiLabelSetColor(Lab, 13, 254, 252) DaamWin = guiCreateGridList(0.03, 0.17, 0.95, 0.61, true, DaamWind) guiSetFont( DaamWin , "default-bold-small") Row = guiGridListAddColumn(DaamWin, "اسم اللاعب", 0.5) xRow = guiGridListAddColumn(DaamWin, "المبلغ", 0.5) BTN = guiCreateButton(0.29, 0.83, 0.39, 0.09, "close|#|اغلاق", true, DaamWind) guiSetProperty(GUBTN, "NormalTextColour", "FF5CFE0C") LAB2 = guiCreateLabel(0.03, 0.88, 0.14, 0.05, "By Mr.Kamaro", true, DaamWind) guiSetFont(LAB2, "default-bold-small") guiLabelSetColor(GLAB2, 13, 254, 252) GUIELAB3 = guiCreateLabel(0.79, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB3, "sa-header") guiLabelSetColor(GUIELAB3, 13, 254, 252) GUIELAB4 = guiCreateLabel(0.94, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB4, "sa-header") guiLabelSetColor(GUIELAB4, 254, 14, 14) GUIELAB5 = guiCreateLabel(0.86, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB5, "sa-header") guiLabelSetColor(GUIELAB5, 92, 254, 12) EdarhBTN = guiCreateButton(0.02, 0.95, 0.06, 0.03, "ادارة", true, DaamWind) EdarhWND = guiCreateWindow(0.25, 0.17, 0.24, 0.21, "ادارة اللوحة", true) guiSetVisible(EdarhWND,false) PlayerEdit = guiCreateEdit(0.03, 0.27, 0.59, 0.16, "", true, EdarhWND) PriceEdit = guiCreateEdit(0.03, 0.62, 0.59, 0.16, "", true, EdarhWND) LabPlayer = guiCreateLabel(0.02, 0.14, 0.59, 0.10, "اسم اللاعب", true, EdarhWND) guiSetFont(LabPlayer, "default-bold-small") guiLabelSetColor(LabPlayer, 0, 251, 254) guiLabelSetHorizontalAlign(LabPlayer, "center", false) guiLabelSetVerticalAlign(LabPlayer, "center") labPrice = guiCreateLabel(0.02, 0.53, 0.59, 0.10, "المبلغ", true, EdarhWND) guiSetFont(labPrice, "default-bold-small") guiLabelSetColor(labPrice, 0, 251, 254) guiLabelSetHorizontalAlign(labPrice, "center", false) guiLabelSetVerticalAlign(labPrice, "center") addData = guiCreateButton(0.63, 0.25, 0.28, 0.17, "اضافة", true, EdarhWND) --PriceSend = guiCreateButton(0.63, 0.61, 0.28, 0.17, "اضافة", true, EdarhWND) Close_Btn = guiCreateButton(0.84, 0.84, 0.13, 0.10, "X", true, EdarhWND) addCommandHandler('داعم', function() guiSetVisible(DaamWind,true) showCursor( true ) end ) addEventHandler("onClientGUIClick", root, function ( ) if ( source == addData ) then local playerText = guiGetText(PlayerEdit) local priceText = guiGetText(PriceEdit) if ( playerText == "" ) or ( priceText == "" ) then outputChatBox("يجب كتآبة التحديث",255,255,0,true) return end triggerServerEvent ( 'add:SQL:data' , localPlayer , playerText , priceText ) guiSetVisible ( EdarhWND , false ) guiSetVisible ( wnd , true ) showCursor ( true ) guiSetInputEnabled(false) guiSetText(PlayerEdit,"" ) guiSetText(PriceEdit,"" ) elseif ( source == BTN ) then guiSetVisible(DaamWind, false) showCursor(false) guiSetInputEnabled(false) elseif ( source == Close_Btn ) then guiSetVisible(EdarhWND,false) showCursor(false) elseif ( source == EdarhBTN ) then local serial = getPlayerSerial() if serialTable[serial] then guiSetVisible(EdarhWND,true) guiSetVisible(DaamWind,false) showCursor(true) end end end ) addEvent('refresh:my:grid' , true ) addEventHandler('refresh:my:grid' , root, function ( sqlTable ) if sqlTable then for Value1 , Value2 in ipairs ( sqlTable ) do local myRow = guiGridListAddRow ( DaamWin ) guiGridListSetItemText ( DaamWin , myRow , 1 , Value2.player , false , false ) guiGridListSetItemText ( DaamWin , myRow , 2 , Value2.price , false , false ) guiGridListSetItemColor ( DaamWin , myRow , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) guiGridListSetItemColor ( DaamWin , myRow , 2 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) end end end ) addEventHandler("onClientRender",root, function() if guiGetVisible(DaamWind,false) then showCursor(true) end end ) سيرفر executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS donatorTable ( player, price )' ) addEvent('add:SQL:data', true ) addEventHandler('add:SQL:data' , root , function ( playerText, priceText ) if playerText and priceText then result = executeSQLQuery("SELECT * FROM `donatorTable` WHERE `player` =?", playerText) if ( type ( result ) == "table" and #result == 0 ) or not result then executeSQLQuery( 'INSERT INTO donatorTable (player, price) VALUES ( ?,? )' , playerText, priceText ) refreshGrids() else local updatePrice = result[1]["price"] + priceText executeSQLQuery( 'UPDATE donatorTable SET price =? WHERE player =?', updatePrice, playerText) refreshGrids() end end end ) function refreshGrids( ) result = executeSQLQuery( 'SELECT * FROM donatorTable' ) if ( type ( result ) == "table" and #result == 0 ) or not result then triggerClientEvent ( root , 'refresh:my:grid' , root , result ) end end addEvent('EventS', true ) addEventHandler('EventS' , root, refreshGrids) addEventHandler('onResourceStart' , resourceRoot, refreshGrids)
  9. عدلت لك الكود تقريباً بشكل كامل, جربه ورد علي كلينت serialTable = { ["D30DD1F9735A43BBD31BB15F655D5EA2"] = true, } local screenW, screenH = guiGetScreenSize() DaamWind = guiCreateWindow((screenW - 696) / 2, (screenH - 418) / 2, 696, 418, "", false) guiWindowSetSizable(DaamWind, false) guiSetAlpha(DaamWind, 1.00) guiSetVisible(DaamWind,false) Lab = guiCreateLabel(0.35, 0.08, 0.33, 0.05, "-| لوحة اعلى 30 داعم للسيرفر |-", true, DaamWind) guiSetFont(Lab, "default-bold-small") guiLabelSetColor(Lab, 13, 254, 252) DaamWin = guiCreateGridList(0.03, 0.17, 0.95, 0.61, true, DaamWind) guiSetFont( DaamWin , "default-bold-small") Row = guiGridListAddColumn(DaamWin, "اسم اللاعب", 0.5) xRow = guiGridListAddColumn(DaamWin, "المبلغ", 0.5) BTN = guiCreateButton(0.29, 0.83, 0.39, 0.09, "close|#|اغلاق", true, DaamWind) guiSetProperty(GUBTN, "NormalTextColour", "FF5CFE0C") LAB2 = guiCreateLabel(0.03, 0.88, 0.14, 0.05, "By Mr.Kamaro", true, DaamWind) guiSetFont(LAB2, "default-bold-small") guiLabelSetColor(GLAB2, 13, 254, 252) GUIELAB3 = guiCreateLabel(0.79, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB3, "sa-header") guiLabelSetColor(GUIELAB3, 13, 254, 252) GUIELAB4 = guiCreateLabel(0.94, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB4, "sa-header") guiLabelSetColor(GUIELAB4, 254, 14, 14) GUIELAB5 = guiCreateLabel(0.86, 0.90, 0.03, 0.06, "*", true, DaamWind) guiSetFont(GUIELAB5, "sa-header") guiLabelSetColor(GUIELAB5, 92, 254, 12) EdarhBTN = guiCreateButton(0.02, 0.95, 0.06, 0.03, "ادارة", true, DaamWind) EdarhWND = guiCreateWindow(0.25, 0.17, 0.24, 0.21, "ادارة اللوحة", true) guiSetVisible(EdarhWND,false) PlayerEdit = guiCreateEdit(0.03, 0.27, 0.59, 0.16, "", true, EdarhWND) PriceEdit = guiCreateEdit(0.03, 0.62, 0.59, 0.16, "", true, EdarhWND) LabPlayer = guiCreateLabel(0.02, 0.14, 0.59, 0.10, "اسم اللاعب", true, EdarhWND) guiSetFont(LabPlayer, "default-bold-small") guiLabelSetColor(LabPlayer, 0, 251, 254) guiLabelSetHorizontalAlign(LabPlayer, "center", false) guiLabelSetVerticalAlign(LabPlayer, "center") labPrice = guiCreateLabel(0.02, 0.53, 0.59, 0.10, "المبلغ", true, EdarhWND) guiSetFont(labPrice, "default-bold-small") guiLabelSetColor(labPrice, 0, 251, 254) guiLabelSetHorizontalAlign(labPrice, "center", false) guiLabelSetVerticalAlign(labPrice, "center") addData = guiCreateButton(0.63, 0.25, 0.28, 0.17, "اضافة", true, EdarhWND) --PriceSend = guiCreateButton(0.63, 0.61, 0.28, 0.17, "اضافة", true, EdarhWND) Close_Btn = guiCreateButton(0.84, 0.84, 0.13, 0.10, "X", true, EdarhWND) addCommandHandler('داعم', function() guiSetVisible(DaamWind,true) showCursor( true ) end ) addEventHandler("onClientGUIClick", root, function ( ) if ( source == addData ) then local playerText = guiGetText(PlayerEdit) local priceText = guiGetText(PriceEdit) if ( playerText == "" ) or ( priceText == "" ) then outputChatBox("يجب كتآبة التحديث",255,255,0,true) return end triggerServerEvent ( 'add:SQL:data' , localPlayer , playerText , priceText ) guiSetVisible ( EdarhWND , false ) guiSetVisible ( wnd , true ) showCursor ( true ) guiSetInputEnabled(false) guiSetText(PlayerEdit,"" ) guiSetText(PriceEdit,"" ) end elseif ( source == BTN ) then guiSetVisible(DaamWind, false) showCursor(false) guiSetInputEnabled(false) elseif ( source == Close_Btn ) then guiSetVisible(EdarhWND,false) showCursor(false) elseif ( source == EdarhBTN ) then local serial = getPlayerSerial() if serialTable[serial] then guiSetVisible(EdarhWND,true) guiSetVisible(DaamWind,false) showCursor(true) end end end ) addEvent('refresh:my:grid' , true ) addEventHandler('refresh:my:grid' , root, function ( sqlTable ) if sqlTable then for Value1 , Value2 in ipairs ( sqlTable ) do local myRow = guiGridListAddRow ( DaamWin ) guiGridListSetItemText ( DaamWin , myRow , 1 , Value2.player , false , false ) guiGridListSetItemText ( DaamWin , myRow , 2 , Value2.price , false , false ) guiGridListSetItemColor ( DaamWin , myRow , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) guiGridListSetItemColor ( DaamWin , myRow , 2 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) ) end end end ) addEventHandler("onClientRender",root, function() if guiGetVisible(DaamWind,false) then showCursor(true) end end ) سيرفر executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS donatorTable ( player, price )' ) addEvent('add:SQL:data', true ) addEventHandler('add:SQL:data' , root , function ( playerText, priceText ) if playerText and priceText then result = executeSQLQuery("SELECT * FROM `donatorTable` WHERE `player` =?", playerText) if ( type ( result ) == "table" and #result == 0 ) or not result then executeSQLQuery( 'INSERT INTO donatorTable (player, price) VALUES ( ?,? )' , playerText, priceText ) refreshGrids() else local updatePrice = result[1]["price"] + priceText executeSQLQuery( 'UPDATE donatorTable SET price =? WHERE player =?', updatePrice, playerText) refreshGrids() end end end ) function refreshGrids( ) result = executeSQLQuery( 'SELECT * FROM donatorTable' ) if ( type ( result ) == "table" and #result == 0 ) or not result then triggerClientEvent ( root , 'refresh:my:grid' , root , Value ) end end ) addEvent('EventS', true ) addEventHandler('EventS' , root, refreshGrids) addEventHandler('onResourceStart' , resourceRoot, refreshGrids)
  10. ليه مسوي زرين إضافة, الأفضل زر واحد للإضافة
  11. شفت الصوره, أكوادك مكررة كيف تبيني أعرف الكود اللي فيه الخطأ ؟
  12. أنت حايس بأم الكود لدرجة الواحد صار ما يفهم أنت وش قاعد تسوي فيه
  13. N3xT

    Quality Test

    https://www.youtube.com/watch?v=hMW_jv0L9Gk gj mate, but if you're a new recorder you should use this race game mode.
  14. تقارن السوني فيغاس بالأفتر إيفكت ؟ بعدين على حسب معرفتي الأفتر إيفكت للتأثيرات مب للمونتاجات ومن أسمه أفتر إيفكت = بعد التأثير
  15. لا فهمت الكود لكن تقدر تعدله وتخليه بدون تحقق الفريز ويظبط ولا بالمتغيرات
  16. إذا الأكواد اللي فوق ما ظبطت معك, ف إحتمال المشكلة تكون من إضافة اللاعبين للقريد ليست ضايفهم أنت بدون ألوانهم ( يعني مسوي gsub )
  17. يقدر يستعمل بدون ما ترسل لاعب ولا شيء عن طريق الكلنت او يكون اللوكال بلاير بعدها لوكال بلاير يعني كذا triggerServerEvent("test",localPlayer,localPlayer) وليس هكذا triggerServerEvent(localPlayer,"test",localPlayer)
  18. ورني كودك اللي سويته
  19. وعليكم السلام, إسمه قريد ليست وليس قراند ليست https://wiki.multitheftauto.com/wiki/GuiGridListAddPlayers
  20. addEventHandler( 'onClientGUIClick', root, function ( ) if ( source == Enterbtn ) then if guiGetEnabled ( Conf ) == false and guiGetEnabled ( Conf2 ) == false then outputChatBox("خطا : جميع الازرار مقفلة", 255, 0, 0 ) else guiSetVisible ( Window, false ) end end end )
  21. اقرأ الكود كامل, مافيه ولا خطأ
×
×
  • Create New...