Adham Posted October 18, 2017 Share Posted October 18, 2017 سلام عليكم ورحمه الله وبركاته انا مسوي قريد لست اسماء لاعبين ولما يحدد اسم اللاعب يجي في اللابيل اسم بس مسوي يعني لو واحد معاه داتا يجيب اسم معين UnKnown شغال 100 % بس المشكله يجي علي كله UnKnown انا ابيه يجي بس UnKnown علي اللاعبين المعهم الداتا والباقي اسمهم عادي السطر : local data = getElementData ( localPlayer, "UnKnown" ) or name guiSetText ( labelName, data ) Link to comment
!#NssoR_) Posted October 18, 2017 Share Posted October 18, 2017 انت جالس تجيب الداتا الي عليك انت موب جالس تجيب الداتا الي علي اللاعبين localPlayer لأنك حاط Link to comment
Adham Posted October 18, 2017 Author Share Posted October 18, 2017 (edited) يعني قصدك اسوي لوب ب كلنت واسوي لو معاهم داتا ؟ for i,v in ipairs ( getElementsByType("player") ) do local data = getElementData ( v, "name" ) or name guiSetText ( label, data ) end Edited October 18, 2017 by Deativated Link to comment
!#NssoR_) Posted October 18, 2017 Share Posted October 18, 2017 بما انك حاط اسماء اللاعبين بقريد ليست حط قيمة اللاعب بداتا من خلال guiGridListSetItemData ومن ثم جيب الداتا , بدال ماتسوي لوب لجميع اللاعبين Link to comment
Adham Posted October 18, 2017 Author Share Posted October 18, 2017 Just now, !#NssoR_) said: بما انك حاط اسماء اللاعبين بقريد ليست حط قيمة اللاعب بداتا من خلال guiGridListSetItemData ومن ثم جيب الداتا , بدال ماتسوي لوب لجميع اللاعبين هل كذا ي صديقي ؟ local name = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if name then guiSetText ( label, getElementData ( name, "name" ) or name ) end Link to comment
!#NssoR_) Posted October 18, 2017 Share Posted October 18, 2017 ماني فاهم الي بتسويه بالضبط ولكن الطريقة الي سويتها لك , اذا كان اللاعب عنده داتا راح يحط القيمة حقتها باللبل واذا ماعنده بيحطلك Unknown local name = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if name then guiSetText ( label, ( getElementData ( name, "name" ) or 'Unknown' ) ) end Link to comment
3NAD Posted October 19, 2017 Share Posted October 19, 2017 7 hours ago, Deativated said: هل كذا ي صديقي ؟ local name = guiGridListGetItemData ( grid, guiGridListGetSelectedItem ( grid ), 1 ) if name then guiSetText ( label, getElementData ( name, "name" ) or name ) end ضع كودك اللي يحط الاسماء باللسته Link to comment
Adham Posted October 19, 2017 Author Share Posted October 19, 2017 for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( aTab1.PlayerList ) guiGridListSetItemPlayerName ( aTab1.PlayerList, row, 1, getPlayerName ( player ), false, false ) guiGridListSetItemData ( aTab1.PlayerList, row, 1, getPlayerName ( player ) ) end local name = guiGridListGetItemData ( aTab1.PlayerList, guiGridListGetSelectedItem ( aTab1.PlayerList ), 1 ) if name then local data = getElementData ( name, "data") or aPlayers[player]["accountname"] guiSetText ( aTab1.Account, "acc: "..data ) end وهذا هوا اصلا تعديل علي لوحه الأدمن Link to comment
' A F . Posted October 19, 2017 Share Posted October 19, 2017 إستخدم بالداتا getPlayerFromName 1 Link to comment
3NAD Posted October 19, 2017 Share Posted October 19, 2017 (edited) 10 hours ago, Deativated said: for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( aTab1.PlayerList ) guiGridListSetItemPlayerName ( aTab1.PlayerList, row, 1, getPlayerName ( player ), false, false ) guiGridListSetItemData ( aTab1.PlayerList, row, 1, getPlayerName ( player ) ) end local name = guiGridListGetItemData ( aTab1.PlayerList, guiGridListGetSelectedItem ( aTab1.PlayerList ), 1 ) if name then local data = getElementData ( name, "data") or aPlayers[player]["accountname"] guiSetText ( aTab1.Account, "acc: "..data ) end وهذا هوا اصلا تعديل علي لوحه الأدمن for id, player in ipairs ( getElementsByType ( "player" ) ) do local row = guiGridListAddRow ( aTab1.PlayerList ) guiGridListSetItemPlayerName ( aTab1.PlayerList, row, 1, getPlayerName ( player ), false, false ) guiGridListSetItemData ( aTab1.PlayerList, row, 1, player ) end local player = guiGridListGetItemData ( aTab1.PlayerList, guiGridListGetSelectedItem ( aTab1.PlayerList ), 1 ) if player then if isElement ( player ) then local data = getElementData ( player, "data") or aPlayers[player]["accountname"] guiSetText ( aTab1.Account, "acc: "..tostring(data) ) else guiSetText ( aTab1.Account, "acc: not found." ) end end Edited October 19, 2017 by 3NAD 1 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