Jump to content

طلب كود حفظ بيانات القريد لست


Abu-Solo

Recommended Posts

9 minutes ago, Abu-Solo said:

ضض معليش خذني علي قد عقلي ومعلوماتي فـ البرمجة, لاهنت اذا تقدر ترسلي الكود الصحيح او الاكواد كاملة فـ الخاص او هنا

فـ بكون مشكور لك

اجل ما يزبط +_+

لازم تشوفلك ملف ويندوز وضيعت الرابط

Link to comment

تمتعرف وين تحطه؟

 C:\Program files\MTA San Andreas\server\mods\deathmatch\modules\ 

اتوقع ملف

modules

ممكن يكون موجود او لا

لو مو موجود

سويه انت

وحط فيه الملف اللي حملته

ثم تروح

الميتا كونف

اللي تحط منها اسم السيرفر وميوت المايك وكذا

وروح وضيف ذي

قبل اخر مجموعة اكواد ورب بعض

  <module src="mta_mysql.dll" />

يعني سوي بحث

ctrl+f

اكتب

module

السطر اللي بعده حط ذي

انتبه لازم يكون السيرفر مطفي

Link to comment
2 minutes ago, Master_MTA said:

تمتعرف وين تحطه؟

 C:\Program files\MTA San Andreas\server\mods\deathmatch\modules\ 

اتوقع ملف

modules

ممكن يكون موجود او لا

لو مو موجود

سويه انت

وحط فيه الملف اللي حملته

ثم تروح

الميتا كونف

اللي تحط منها اسم السيرفر وميوت المايك وكذا

وروح وضيف ذي

قبل اخر مجموعة اكواد ورب بعض


  <module src="mta_mysql.dll" />

يعني سوي بحث

ctrl+f

اكتب

module

السطر اللي بعده حط ذي

انتبه لازم يكون السيرفر مطفي

تم ســويت اللي قلتلي علية, الحين وش آسوي

Link to comment
2 minutes ago, Master_MTA said:

زبط هو؟

 

 

1 minute ago, Master_MTA said:

همم والله مقدر افتيلك رحم الله عبدا قال لا اعرف او لا اعلم نسيت

بس لا اعلم

علي العموم يعطيك الف عافية علي المجهود اللي تعبتة معي.. ادري اني تعبتك وتعبت الناس الثانية, 

انشاء الله بيجي احد وبيفيدني

  • Like 1
Link to comment
4 minutes ago, Abu-Solo said:

 

علي العموم يعطيك الف عافية علي المجهود اللي تعبتة معي.. ادري اني تعبتك وتعبت الناس الثانية, 

انشاء الله بيجي احد وبيفيدني

لا يا غالي التعب لك راحه

Link to comment

ماشوف انك تحفظ كلام ماله داعي ويعلق عليك السيرفر

 

خل التعديل من نفس المود lua

 

وتخش الأستضافه وتعدل وتسوي ريفرش وريستارت

 

 

بس اذا تبي طرق للحفظ من ضمنها xml

 

 

  • Like 1
Link to comment
1 minute ago, MR.S3D said:

ماشوف انك تحفظ كلام ماله داعي ويعلق عليك السيرفر

 

خل التعديل من نفس المود lua

 

وتخش الأستضافه وتعدل وتسوي ريفرش وريستارت

 

 

بس اذا تبي طرق للحفظ من ضمنها xml

 

 

انا اشتغل علي سيرفر محلي ما اشتغل علي استضافة,

اذا فيه طريقة اسهل لـ حفظ الكلام فـ وش بتكون الطريقة؟

Link to comment
--Client

wnd = guiCreateWindow(0.33, 0.27, 0.34, 0.46, "News", true)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd,false)
gridNews = guiCreateGridList(0.03, 0.07, 0.94, 0.69, true, wnd)
guiGridListAddColumn(gridNews, "News", 0.9)
Edarh = guiCreateButton(0.02, 0.80, 0.09, 0.10, "ادارة", true, wnd)
ButtonClose = guiCreateButton(82, 398, 319, 50, "Close", true, wnd )
EdarahWindow = guiCreateWindow(0.32, 0.29, 0.37, 0.16, "ادارة", true)
guiWindowSetSizable(EdarahWindow, false)
guiSetProperty(EdarahWindow, "CaptionColour", "FFFE0000")
guiSetVisible(EdarahWindow,false)
SendEdit = guiCreateEdit(0.03, 0.21, 0.95, 0.21, "", true, EdarahWindow)
SendBTN = guiCreateButton(0.24, 0.52, 0.54, 0.15, "أرسال التحديث", true, EdarahWindow)
guiSetProperty(SendBTN, "NormalTextColour", "FFFDB300")
Close_BTN = guiCreateButton(0.66, 0.41, 0.02, 0.03, "X", true,EdarahWindow)


function aOpen( )
    guiSetVisible( wnd, not guiGetVisible( wnd ) )
    showCursor( guiGetVisible( wnd ) )
end
bindKey('x','down',aOpen)


showCursor ( false )

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == Edarh ) then
        guiSetVisible(EdarahWindow,true)
        guiSetVisible(wnd,false)
        
    elseif ( source == Close_BTN ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,true)
        showCursor(true)
        
    elseif ( source == ButtonClose ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,false)
        showCursor(false)
    end
end )

addEventHandler("onClientGUIClick", SendBTN,
function ( )
    local Text = guiGetText(SendEdit)
        if ( Text == "" ) or ( Text == " " ) then return end
            Row = guiGridListAddRow ( gridNews )
            guiGridListSetItemText ( gridNews , Row , 1 , Text , false , false )
            triggerServerEvent ( 'Event' , localPlayer , Text )
            guiSetVisible ( EdarahWindow , false )
            guiSetVisible ( wnd , true )
            showCursor ( false )
end , false )

addEventHandler('onClientResourceStart' , resourceRoot ,
function ( )
    triggerServerEvent ( 'EventS' , localPlayer )
end )

addEvent('EventT2' , true )
addEventHandler('EventT2' , getRootElement ( ),
function ( Value )
    for Value1 , Value2 in ipairs ( Value ) do
        guiGridListSetItemText ( gridNews , guiGridListAddRow ( gridNews ) , 1 , Value2.aRows , false , false )
    end
end )

--Server

executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSoking ( aRows )' )

addEvent('Event', true )
addEventHandler('Event' , getRootElement ( ) ,
function ( aText )
    executeSQLQuery( 'INSERT INTO aSoking VALUES ( ? )' , aText )
end )

addEvent('EventS', true )
addEventHandler('EventS' , getRootElement ( ) ,
function ( )
    Value = executeSQLQuery( 'SELECT * FROM aSoking' )
        if ( #Value ~= 0 ) then
            triggerClientEvent ( source , 'EventT2' , source , Value )
    end
end )

[Click and drag to move]

 

  • Like 1
Link to comment
14 minutes ago, #Soking said:

--Client

wnd = guiCreateWindow(0.33, 0.27, 0.34, 0.46, "News", true)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd,false)
gridNews = guiCreateGridList(0.03, 0.07, 0.94, 0.69, true, wnd)
guiGridListAddColumn(gridNews, "News", 0.9)
Edarh = guiCreateButton(0.02, 0.80, 0.09, 0.10, "ادارة", true, wnd)
ButtonClose = guiCreateButton(82, 398, 319, 50, "Close", true, wnd )
EdarahWindow = guiCreateWindow(0.32, 0.29, 0.37, 0.16, "ادارة", true)
guiWindowSetSizable(EdarahWindow, false)
guiSetProperty(EdarahWindow, "CaptionColour", "FFFE0000")
guiSetVisible(EdarahWindow,false)
SendEdit = guiCreateEdit(0.03, 0.21, 0.95, 0.21, "", true, EdarahWindow)
SendBTN = guiCreateButton(0.24, 0.52, 0.54, 0.15, "أرسال التحديث", true, EdarahWindow)
guiSetProperty(SendBTN, "NormalTextColour", "FFFDB300")
Close_BTN = guiCreateButton(0.66, 0.41, 0.02, 0.03, "X", true,EdarahWindow)


function aOpen( )
    guiSetVisible( wnd, not guiGetVisible( wnd ) )
    showCursor( guiGetVisible( wnd ) )
end
bindKey('x','down',aOpen)


showCursor ( false )

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == Edarh ) then
        guiSetVisible(EdarahWindow,true)
        guiSetVisible(wnd,false)
        
    elseif ( source == Close_BTN ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,true)
        showCursor(true)
        
    elseif ( source == ButtonClose ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,false)
        showCursor(false)
    end
end )

addEventHandler("onClientGUIClick", SendBTN,
function ( )
    local Text = guiGetText(SendEdit)
        if ( Text == "" ) or ( Text == " " ) then return end
            Row = guiGridListAddRow ( gridNews )
            guiGridListSetItemText ( gridNews , Row , 1 , Text , false , false )
            triggerServerEvent ( 'Event' , localPlayer , Text )
            guiSetVisible ( EdarahWindow , false )
            guiSetVisible ( wnd , true )
            showCursor ( false )
end , false )

addEventHandler('onClientResourceStart' , resourceRoot ,
function ( )
    triggerServerEvent ( 'EventS' , localPlayer )
end )

addEvent('EventT2' , true )
addEventHandler('EventT2' , getRootElement ( ),
function ( Value )
    for Value1 , Value2 in ipairs ( Value ) do
        guiGridListSetItemText ( gridNews , guiGridListAddRow ( gridNews ) , 1 , Value2.aRows , false , false )
    end
end )

--Server

executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSoking ( aRows )' )

addEvent('Event', true )
addEventHandler('Event' , getRootElement ( ) ,
function ( aText )
    executeSQLQuery( 'INSERT INTO aSoking VALUES ( ? )' , aText )
end )

addEvent('EventS', true )
addEventHandler('EventS' , getRootElement ( ) ,
function ( )
    Value = executeSQLQuery( 'SELECT * FROM aSoking' )
        if ( #Value ~= 0 ) then
            triggerClientEvent ( source , 'EventT2' , source , Value )
    end
end )

[Click and drag to move]

 

يــعطيك العـآفية وتمت الافادة.

واتمني انك تقولي اذا اتعبتك معي ولالا.

والف الف شكر لـ كل من ساعدني فـ الموضوع هذا

 

Link to comment

أكتشفت غلطه عندي , بدل الاكواد التاليه بـ الاكواد الـ عندك
 

-- Server

executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSoking ( aRows )' )

addEvent('Event', true )
addEventHandler('Event' , getRootElement ( ) ,
function ( aText )
    executeSQLQuery( 'INSERT INTO aSoking VALUES ( ? )' , aText )
    triggerClientEvent( getRootElement ( ) , 'addText', getRootElement ( ) , Text )
end )

addEvent('EventS', true )
addEventHandler('EventS' , getRootElement ( ) ,
function ( )
    Value = executeSQLQuery( 'SELECT * FROM aSoking' )
        if ( #Value ~= 0 ) then
            triggerClientEvent ( source , 'EventT2' , source , Value )
    end
end )

-- Client

wnd = guiCreateWindow(0.33, 0.27, 0.34, 0.46, "News", true)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd,false)
gridNews = guiCreateGridList(0.03, 0.07, 0.94, 0.69, true, wnd)
guiGridListAddColumn(gridNews, "News", 0.9)
Edarh = guiCreateButton(0.02, 0.80, 0.09, 0.10, "ادارة", true, wnd)
ButtonClose = guiCreateButton(82, 398, 319, 50, "Close", true, wnd )
EdarahWindow = guiCreateWindow(0.32, 0.29, 0.37, 0.16, "ادارة", true)
guiWindowSetSizable(EdarahWindow, false)
guiSetProperty(EdarahWindow, "CaptionColour", "FFFE0000")
guiSetVisible(EdarahWindow,false)
SendEdit = guiCreateEdit(0.03, 0.21, 0.95, 0.21, "", true, EdarahWindow)
SendBTN = guiCreateButton(0.24, 0.52, 0.54, 0.15, "أرسال التحديث", true, EdarahWindow)
guiSetProperty(SendBTN, "NormalTextColour", "FFFDB300")
Close_BTN = guiCreateButton(0.66, 0.41, 0.02, 0.03, "X", true,EdarahWindow)


function aOpen( )
    guiSetVisible( wnd, not guiGetVisible( wnd ) )
    showCursor( guiGetVisible( wnd ) )
end
bindKey('x','down',aOpen)


showCursor ( false )

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == Edarh ) then
        guiSetVisible(EdarahWindow,true)
        guiSetVisible(wnd,false)
        
    elseif ( source == Close_BTN ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,true)
        showCursor(true)
        
    elseif ( source == ButtonClose ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,false)
        showCursor(false)
    end
end )

addEventHandler("onClientGUIClick", SendBTN,
function ( )
    aZText = guiGetText(SendEdit)
        if ( aZText == "" ) or ( aZText == " " ) then return end
            triggerServerEvent ( 'Event' , localPlayer , aZText )
            guiSetVisible ( EdarahWindow , false )
            guiSetVisible ( wnd , true )
            showCursor ( false )
end , false )

addEventHandler('onClientResourceStart' , resourceRoot ,
function ( )
    triggerServerEvent ( 'EventS' , localPlayer )
end )


addEvent('addText' , true )
addEventHandler('addText' , getRootElement ( ),
function ( )
    guiGridListSetItemText ( gridNews ,  guiGridListAddRow ( gridNews ) , 1 , aZText , false , false )
end )

addEvent('EventT2' , true )
addEventHandler('EventT2' , getRootElement ( ),
function ( Value )
    for Value1 , Value2 in ipairs ( Value ) do
        guiGridListSetItemText ( gridNews , guiGridListAddRow ( gridNews ) , 1 , Value2.aRows , false , false )
    end
end )

 

Link to comment
3 minutes ago, #Soking said:

أكتشفت غلطه عندي , بدل الاكواد التاليه بـ الاكواد الـ عندك
 


-- Server

executeSQLQuery ( 'CREATE TABLE IF NOT EXISTS aSoking ( aRows )' )

addEvent('Event', true )
addEventHandler('Event' , getRootElement ( ) ,
function ( aText )
    executeSQLQuery( 'INSERT INTO aSoking VALUES ( ? )' , aText )
    triggerClientEvent( getRootElement ( ) , 'addText', getRootElement ( ) , Text )
end )

addEvent('EventS', true )
addEventHandler('EventS' , getRootElement ( ) ,
function ( )
    Value = executeSQLQuery( 'SELECT * FROM aSoking' )
        if ( #Value ~= 0 ) then
            triggerClientEvent ( source , 'EventT2' , source , Value )
    end
end )

-- Client

wnd = guiCreateWindow(0.33, 0.27, 0.34, 0.46, "News", true)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd,false)
gridNews = guiCreateGridList(0.03, 0.07, 0.94, 0.69, true, wnd)
guiGridListAddColumn(gridNews, "News", 0.9)
Edarh = guiCreateButton(0.02, 0.80, 0.09, 0.10, "ادارة", true, wnd)
ButtonClose = guiCreateButton(82, 398, 319, 50, "Close", true, wnd )
EdarahWindow = guiCreateWindow(0.32, 0.29, 0.37, 0.16, "ادارة", true)
guiWindowSetSizable(EdarahWindow, false)
guiSetProperty(EdarahWindow, "CaptionColour", "FFFE0000")
guiSetVisible(EdarahWindow,false)
SendEdit = guiCreateEdit(0.03, 0.21, 0.95, 0.21, "", true, EdarahWindow)
SendBTN = guiCreateButton(0.24, 0.52, 0.54, 0.15, "أرسال التحديث", true, EdarahWindow)
guiSetProperty(SendBTN, "NormalTextColour", "FFFDB300")
Close_BTN = guiCreateButton(0.66, 0.41, 0.02, 0.03, "X", true,EdarahWindow)


function aOpen( )
    guiSetVisible( wnd, not guiGetVisible( wnd ) )
    showCursor( guiGetVisible( wnd ) )
end
bindKey('x','down',aOpen)


showCursor ( false )

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == Edarh ) then
        guiSetVisible(EdarahWindow,true)
        guiSetVisible(wnd,false)
        
    elseif ( source == Close_BTN ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,true)
        showCursor(true)
        
    elseif ( source == ButtonClose ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,false)
        showCursor(false)
    end
end )

addEventHandler("onClientGUIClick", SendBTN,
function ( )
    aZText = guiGetText(SendEdit)
        if ( aZText == "" ) or ( aZText == " " ) then return end
            triggerServerEvent ( 'Event' , localPlayer , aZText )
            guiSetVisible ( EdarahWindow , false )
            guiSetVisible ( wnd , true )
            showCursor ( false )
end , false )

addEventHandler('onClientResourceStart' , resourceRoot ,
function ( )
    triggerServerEvent ( 'EventS' , localPlayer )
end )


addEvent('addText' , true )
addEventHandler('addText' , getRootElement ( ),
function ( )
    guiGridListSetItemText ( gridNews ,  guiGridListAddRow ( gridNews ) , 1 , aZText , false , false )
end )

addEvent('EventT2' , true )
addEventHandler('EventT2' , getRootElement ( ),
function ( Value )
    for Value1 , Value2 in ipairs ( Value ) do
        guiGridListSetItemText ( gridNews , guiGridListAddRow ( gridNews ) , 1 , Value2.aRows , false , false )
    end
end )

 

تقدر تضيفلي كود اللي يغير لون القريد تلقائي؟

Link to comment
`

wnd = guiCreateWindow(0.33, 0.27, 0.34, 0.46, "News", true)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd,false)
gridNews = guiCreateGridList(0.03, 0.07, 0.94, 0.69, true, wnd)
guiGridListAddColumn(gridNews, "News", 0.9)
Edarh = guiCreateButton(0.02, 0.80, 0.09, 0.10, "ادارة", true, wnd)
ButtonClose = guiCreateButton(82, 398, 319, 50, "Close", true, wnd )
EdarahWindow = guiCreateWindow(0.32, 0.29, 0.37, 0.16, "ادارة", true)
guiWindowSetSizable(EdarahWindow, false)
guiSetProperty(EdarahWindow, "CaptionColour", "FFFE0000")
guiSetVisible(EdarahWindow,false)
SendEdit = guiCreateEdit(0.03, 0.21, 0.95, 0.21, "", true, EdarahWindow)
SendBTN = guiCreateButton(0.24, 0.52, 0.54, 0.15, "أرسال التحديث", true, EdarahWindow)
guiSetProperty(SendBTN, "NormalTextColour", "FFFDB300")
Close_BTN = guiCreateButton(0.66, 0.41, 0.02, 0.03, "X", true,EdarahWindow)


function aOpen( )
    guiSetVisible( wnd, not guiGetVisible( wnd ) )
    showCursor( guiGetVisible( wnd ) )
end
bindKey('x','down',aOpen)

showCursor ( false )

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == Edarh ) then
        guiSetVisible(EdarahWindow,true)
        guiSetVisible(wnd,false)
        
    elseif ( source == Close_BTN ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,true)
        showCursor(true)
        
    elseif ( source == ButtonClose ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,false)
        showCursor(false)
    end
end )

addEventHandler("onClientGUIClick", SendBTN,
function ( )
    aZText = guiGetText(SendEdit)
        if ( aZText == "" ) or ( aZText == " " ) then return end
            triggerServerEvent ( 'Event' , localPlayer , aZText )
            guiSetVisible ( EdarahWindow , false )
            guiSetVisible ( wnd , true )
            showCursor ( false )
end , false )

addEventHandler('onClientResourceStart' , resourceRoot ,
function ( )
    triggerServerEvent ( 'EventS' , localPlayer )
end )

guiSetFont( gridNews , "default-bold-small")

addEvent('addText' , true )
addEventHandler('addText' , getRootElement ( ),
function ( )
    local aRow2 = guiGridListAddRow ( gridNews )
        guiGridListSetItemText ( gridNews ,  aRow2 , 1 , aZText , false , false )
        guiGridListSetItemColor ( gridNews , aRowz , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) )
end )

addEvent('EventT2' , true )
addEventHandler('EventT2' , getRootElement ( ),
function ( Value )
    for Value1 , Value2 in ipairs ( Value ) do
        local aRowz = guiGridListAddRow ( gridNews )
            guiGridListSetItemText ( gridNews , aRowz , 1 , Value2.aRows , false , false )
            guiGridListSetItemColor ( gridNews , aRowz , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) )
    end
end )

 دا كلينت , راح يوضح لك الخط + يعدلك الون ~_~

  • Like 1
Link to comment
3 minutes ago, #Soking said:

`

wnd = guiCreateWindow(0.33, 0.27, 0.34, 0.46, "News", true)
guiWindowSetSizable(wnd, false)
guiSetVisible(wnd,false)
gridNews = guiCreateGridList(0.03, 0.07, 0.94, 0.69, true, wnd)
guiGridListAddColumn(gridNews, "News", 0.9)
Edarh = guiCreateButton(0.02, 0.80, 0.09, 0.10, "ادارة", true, wnd)
ButtonClose = guiCreateButton(82, 398, 319, 50, "Close", true, wnd )
EdarahWindow = guiCreateWindow(0.32, 0.29, 0.37, 0.16, "ادارة", true)
guiWindowSetSizable(EdarahWindow, false)
guiSetProperty(EdarahWindow, "CaptionColour", "FFFE0000")
guiSetVisible(EdarahWindow,false)
SendEdit = guiCreateEdit(0.03, 0.21, 0.95, 0.21, "", true, EdarahWindow)
SendBTN = guiCreateButton(0.24, 0.52, 0.54, 0.15, "أرسال التحديث", true, EdarahWindow)
guiSetProperty(SendBTN, "NormalTextColour", "FFFDB300")
Close_BTN = guiCreateButton(0.66, 0.41, 0.02, 0.03, "X", true,EdarahWindow)


function aOpen( )
    guiSetVisible( wnd, not guiGetVisible( wnd ) )
    showCursor( guiGetVisible( wnd ) )
end
bindKey('x','down',aOpen)

showCursor ( false )

addEventHandler("onClientGUIClick",root,
function ( )
    if ( source == Edarh ) then
        guiSetVisible(EdarahWindow,true)
        guiSetVisible(wnd,false)
        
    elseif ( source == Close_BTN ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,true)
        showCursor(true)
        
    elseif ( source == ButtonClose ) then
        guiSetVisible(EdarahWindow,false)
        guiSetVisible(wnd,false)
        showCursor(false)
    end
end )

addEventHandler("onClientGUIClick", SendBTN,
function ( )
    aZText = guiGetText(SendEdit)
        if ( aZText == "" ) or ( aZText == " " ) then return end
            triggerServerEvent ( 'Event' , localPlayer , aZText )
            guiSetVisible ( EdarahWindow , false )
            guiSetVisible ( wnd , true )
            showCursor ( false )
end , false )

addEventHandler('onClientResourceStart' , resourceRoot ,
function ( )
    triggerServerEvent ( 'EventS' , localPlayer )
end )

guiSetFont( gridNews , "default-bold-small")

addEvent('addText' , true )
addEventHandler('addText' , getRootElement ( ),
function ( )
    local aRow2 = guiGridListAddRow ( gridNews )
        guiGridListSetItemText ( gridNews ,  aRow2 , 1 , aZText , false , false )
        guiGridListSetItemColor ( gridNews , aRowz , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) )
end )

addEvent('EventT2' , true )
addEventHandler('EventT2' , getRootElement ( ),
function ( Value )
    for Value1 , Value2 in ipairs ( Value ) do
        local aRowz = guiGridListAddRow ( gridNews )
            guiGridListSetItemText ( gridNews , aRowz , 1 , Value2.aRows , false , false )
            guiGridListSetItemColor ( gridNews , aRowz , 1 , math.random ( 255 ), math.random ( 255 ), math.random ( 255 ) )
    end
end )

 دا كلينت , راح يوضح لك الخط + يعدلك الون ~_~

مشكور وجزاك الله كل خير

تمت الافادة

@#Soking

  • Like 1
Link to comment
On 12/7/2016 at 7:14 PM, 3NAD said:

local database = dbConnect ( "sqlite", "MSG_DB.db" )
dbExec ( database, "CREATE TABLE IF NOT EXISTS `MSG` (`TXT`)")

saveTheMessage = function ( text )
	if text then
		local db = dbPoll ( dbQuery ( database, "SELECT * FROM `MSG`" ), -1 )
		if #db > 0 then
			dbExec ( database, "UPDATE `MSG` SET `TXT`=?", tostring(text) )
		else
			dbExec ( database, "INSERT INTO `MSG` VALUES(?)", tostring(text) )
		end		
	end
end

getTheMessage = function ( )
	local message = ""
	local db = dbPoll ( dbQuery ( database, "SELECT * FROM `MSG`" ), -1 )
	if #db > 0 then
		message = tostring(db[1].TXT)
	end
	return message
end

 

طريقة الإستخدام؟


saveTheMessage ( text )

saveTheMessage ( "WELCOME" )

--

message = getTheMessage ( )

 

الكود هذا كان مختصر عليك. لكن أرى الموضوع صار صفحتين ليه !؟

واحد يقول حط الداتا بيس بالميتا وواحد يقول حمل مودل على السيرفر 

و آخرتها يجي واحد ويغير الكود من داتا بيس خارجي إلى داخلي  !

--

واذا على قضية انه يجيب اكثر من رسالة ف لا بأس بتعديل الكود الأولي

 

عموماً بالتوفيق لصاحب الموضوع

  • Like 1
Link to comment
10 minutes ago, 3NAD said:

الكود هذا كان مختصر عليك. لكن أرى الموضوع صار صفحتين ليه !؟

واحد يقول حط الداتا بيس بالميتا وواحد يقول حمل مودل على السيرفر 

و آخرتها يجي واحد ويغير الكود من داتا بيس خارجي إلى داخلي  !

--

واذا على قضية انه يجيب اكثر من رسالة ف لا بأس بتعديل الكود الأولي

 

عموماً بالتوفيق لصاحب الموضوع

يعطيك العافية يا عناد, انا مجرب الكود حقك والكود حقة

كلهم شغالين

بالتوفيق لك بعد ~

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...