SCi Posted January 22 Share Posted January 22 (edited) مسوي لوحة وعملت اذا اللاعب فتح Group ACL اللوحة يتحقق اذا هوا في باسم معين اذا اللاعب فيه بيتحط في قائمه المساعدين لكن كل ما افتح القائمه من الزر المحدد يتكرر الاسم بعرض عليكم كودي لمحاولة عدم تكرار الاسم • Client addEvent("ShowPinG",true) addEventHandler("ShowPinG",root, function(name) local idrow = guiGridListGetRowCount(NameGrid) local n1 = guiGridListGetItemText(NameGrid, idrow, 1) if name == n1 then return end local row = guiGridListAddRow(NameGrid) guiGridListGetItemText(NameGrid, name,false, false) end end) Edited January 22 by SCi Link to comment
SCi Posted January 22 Author Share Posted January 22 (edited) name للعلم الاسم موجود في متغير اسمه في ملف السيرفر Edited January 22 by SCi Link to comment
MR.Mosa Posted January 22 Share Posted January 22 (edited) انت مش موضح طلبك ايش بالزبط وفيه اكواد خطا حسب ما فهمت بتحتاج الكود بهاذا الشكل function isList(name) local sList = false local idrow = guiGridListGetRowCount(NameGrid) for v = 0,idrow do if ( guiGridListGetItemText(NameGrid, v, 1) == name ) then sList = true end end return sList end addEvent("ShowPinG",true) addEventHandler("ShowPinG",root, function(name) if ( isList(name) == false ) then local row = guiGridListAddRow(NameGrid) guiGridListSetItemText ( NameGrid, row, 1, name, false, false ) end end ) Edited January 22 by MR.Mosa Link to comment
SCi Posted January 22 Author Share Posted January 22 3 hours ago, MR.Mosa said: انت مش موضح طلبك ايش بالزبط وفيه اكواد خطا حسب ما فهمت بتحتاج الكود بهاذا الشكل function isList(name) local sList = false local idrow = guiGridListGetRowCount(NameGrid) for v = 0,idrow do if ( guiGridListGetItemText(NameGrid, v, 1) == name ) then sList = true end end return sList end addEvent("ShowPinG",true) addEventHandler("ShowPinG",root, function(name) if ( isList(name) == false ) then local row = guiGridListAddRow(NameGrid) guiGridListSetItemText ( NameGrid, row, 1, name, false, false ) end end ) كان قصدي بشكل مختصر ان اسم اللاعب في GridList بيظهر بتكرار يعني مثلا انا رابط ظهور اسم اللاعب في الجريد ليست لما افتح اللوحة وبهاد الشكل كل مره افتح فيها اللوحة اسمي يظهر بتكرار Link to comment
MR.Mosa Posted January 23 Share Posted January 23 (edited) فهمت عليك وهاذا اللي سويته لك Edited January 23 by MR.Mosa Link to comment
SCi Posted January 27 Author Share Posted January 27 On 23/01/2024 at 19:33, MR.Mosa said: فهمت عليك وهاذا اللي سويته لك للاسف مانفعت Link to comment
Spyrax Posted January 27 Share Posted January 27 (edited) 56 minutes ago, SCi said: للاسف مانفعت function ShowPlayers ( ) guiGridListClear ( NameGrid ) local players = getElementsByType ("player") for i,v in ipairs (players) do local row = guiGridListAddRow ( NameGrid ) guiGridListSetItemText(NameGrid,row,1, getPlayerName ( v ),false, false) end end addEvent("ShowPinG",true) addEventHandler("ShowPinG",root, function() ShowPlayers ( ) end) -- NameGrid = اسم القريد ليست Edited January 27 by Spyrax Link to comment
SCi Posted March 27 Author Share Posted March 27 On 27/01/2024 at 21:57, Spyrax said: function ShowPlayers ( ) guiGridListClear ( NameGrid ) local players = getElementsByType ("player") for i,v in ipairs (players) do local row = guiGridListAddRow ( NameGrid ) guiGridListSetItemText(NameGrid,row,1, getPlayerName ( v ),false, false) end end addEvent("ShowPinG",true) addEventHandler("ShowPinG",root, function() ShowPlayers ( ) end) -- NameGrid = اسم القريد ليست اشكرك بجرب 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