~Mr.Hassan Posted November 23, 2017 Share Posted November 23, 2017 السلام عليكم عملت كود ان يطلع حساب الشخص في القريد ليست وما يطلع الحساب ب القريد ليست بس الاسم وما يطلع مشكله ب الدي بق يا ريت اي حد يعرف يساعدني الكود loca = getLocalPlayer() function putAllAccountsInList() triggerServerEvent("putaccount",loca) end addEvent("putaccount",true) addEventHandler("putaccount",root, function() for k, v in ipairs (getAccounts()) do local accname = getAccountName(v) triggerClientEvent("put",root,accname) end end) function add(accname) guiGridListSetItemText ( GUIEditor.gridlist[1], guiGridListAddRow( GUIEditor.gridlist[1] ), colmacc, accname, false, false ) end addEvent("put",true) addEventHandler("put",loca,add) Link to comment
Adham Posted November 24, 2017 Share Posted November 24, 2017 (edited) تفضل : -- Client Side -- loca = getLocalPlayer() function putAllAccountsInList ( ) triggerServerEvent( "putaccount", loca ) end addEvent("put",true) addEventHandler("put", root, function ( vTable ) if vTable and type ( vTable ) == "table" then guiGridListClear ( GUIEditor.gridlist[1] ) for i,v in ipairs ( vTable ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, vTable, false, false ) end end end ) -- Server Side -- addEvent ( "putaccount", true ) addEventHandler ( "putaccount", root, function ( ) local vTable = { } ; for i,v in ipairs ( getAccounts ( ) ) do local acc = getAccountName ( v ) if acc then table.insert ( vTable, acc ) end end triggerClientEvent ( source, "put", resourceRoot, vTable ) end ) Edited November 24, 2017 by -Le[3]bA. 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