#Mr.Rajo~,< Posted July 21, 2015 Share Posted July 21, 2015 السلام عليكم ورحمة الله وبركاته --Client Side addEvent("GetAccount" ,true) addEventHandler("GetAccount",root, function (getAc) for _,v in ipairs(getAc) do local row = guiGridListAddRow(GridAccount) guiGridListSetItemText(GridAccount,row,1, v,false,false) end end) --Server Side function Account () pl = getElementsByType("player") for _,v in ipairs (pl) do GetPlayer = getPlayerAccount(v) getAc = getAccountName(GetPlayer) triggerClientEvent("GetAccount",root ,getAc) end end ابيه يطلع جميع الاكاونتات الموجود بالقريد ليست ض Link to comment
Simple. Posted July 21, 2015 Share Posted July 21, 2015 -- #Server Side addEvent ( "getAccss", true ) addEventHandler ( "getAccss", root, function () for i,v in ipairs ( getAccounts ( ) ) do accs = getAccountName ( v ) triggerClientEvent ( "getAccssClient", source, accs ) end end) -- #Client Side addEvent ("getAccssClient", true ) addEventHandler ( "getAccssClient", getRootElement(), function ( accs ) local row = guiGridListAddRow ( AccountsGrid ) guiGridListSetItemText ( AccountsGrid, row, 1, tostring ( accs ), false, false ) end) تفضل هذا الكود موجود عندي من زمان Link to comment
' A F . Posted July 21, 2015 Share Posted July 21, 2015 سوي يوم يفتح اللوحة triggerServerEvent('getAccss',localPlayer) Link to comment
#Mr.Rajo~,< Posted July 21, 2015 Author Share Posted July 21, 2015 مافهمت كذا bindKey("f3", "Down", function(getAc) guiSetVisible(win , not guiGetVisible(win)) showCursor(guiGetVisible(win)) triggerServerEvent('getAccss',localPlayer) end) Link to comment
' A F . Posted July 21, 2015 Share Posted July 21, 2015 خلي اول م يفتح اللوحة يرسل ترايقر مثال addCommandHandler("Open", function ( ) guiSetVisible(wnd,true) showCursor(true) triggerServerEvent('getAccss',localPlayer) end) Link to comment
#Mr.Rajo~,< Posted July 21, 2015 Author Share Posted July 21, 2015 خلي اول م يفتح اللوحة يرسل ترايقر مثال addCommandHandler("Open", function ( ) guiSetVisible(wnd,true) showCursor(true) triggerServerEvent('getAccss',localPlayer) end) ماجا ض Link to comment
#Mr.Rajo~,< Posted July 21, 2015 Author Share Posted July 21, 2015 تم الحل من قبل xiProGamer الحل --server side addEvent('getAccss',true) addEventHandler('getAccss',root, function ( ) AccountsTable = {} for k,v in ipairs(getAccounts()) do local name = getAccountName ( v ) table.insert(AccountsTable,{name}) end triggerClientEvent(root, "AccountNow",root, AccountsTable) end) client side addEvent('AccountNow',true) addEventHandler('AccountNow', root, function ( AccountsTables ) guiGridListClear(GridAccount) for k,v in pairs(AccountsTables) do local row = guiGridListAddRow(GridAccount) guiGridListSetItemText(GridAccount, row,1, tostring(v[1]), false, false) end end ) مع اضافة triggerServerEvent('getAccss',localPlayer) عند كود فتح النافذه شكرررررررررررررررا برو قيمر 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