Mr-M3AND Posted January 28, 2014 Share Posted January 28, 2014 السلام عليكم لاهنتو شباب هذا كود القريد ليست اسماء اللاعبين ابي الون اسماء اللاعبين نفس لون تاج الادمنية الخاص بكل لاعب بس مايطلع معي الا لون التاج الاصلي للعبه مع .. هل من حل , player colors و freeroam اني قفلت ال Wnd = {} button = {} GridList = {} Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.-- s8) --> button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, column, getPlayerName ( v ), false, false ) local r, g, b = getPlayerNametagColor(localPlayer) guiGridListSetItemColor ( GridList[1], row , column, r, g, b ) end Link to comment
!#NssoR_) Posted January 28, 2014 Share Posted January 28, 2014 جرب # Wnd = {} button = {} GridList = {} Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.8 ) button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, column, getPlayerName ( v ), false, false ) local r, g, b = getPlayerNametagColor(v) guiGridListSetItemColor ( GridList[1], row , column, r, g, b ) end Link to comment
Mr-M3AND Posted January 28, 2014 Author Share Posted January 28, 2014 جرب # Wnd = {} button = {} GridList = {} Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.8 ) button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, column, getPlayerName ( v ), false, false ) local r, g, b = getPlayerNametagColor(v) guiGridListSetItemColor ( GridList[1], row , column, r, g, b ) end ماتغير شي Link to comment
!#NssoR_) Posted January 28, 2014 Share Posted January 28, 2014 توي جربته وشغال معي زي العسل ! Link to comment
Mr-M3AND Posted January 28, 2014 Author Share Posted January 28, 2014 توي جربته وشغال معي زي العسل ! يجي عندي نفس اللون اللي بالتاب جربت اكثر من تاج ماضبط معي Link to comment
Mando Posted January 28, 2014 Share Posted January 28, 2014 هو يبي ان لون التاج يجي في اسماء القريد لست مثلآ التاج لونة " ازرق " يجي اسم الاعبين ازرق في القريد لست هذه والله اعلم ! Link to comment
EH10 Posted January 28, 2014 Share Posted January 28, 2014 يبي * . اسم الاعب في القريد ليست على لون تاجة فهمت Link to comment
Mando Posted January 28, 2014 Share Posted January 28, 2014 يبي * . اسم الاعب في القريد ليست على لون تاجة فهمت لاهنتو شباب هذا كود القريد ليست اسماء اللاعبين ابي الون اسماء اللاعبين نفس لون تاج الادمنية الخاص بكل لاعب بس مايطلع معي الا لون التاج الاصلي للعبه مع .. هل من حل , player colors و freeroam اني قفلت ال Link to comment
فاّرس Posted January 28, 2014 Share Posted January 28, 2014 مالها دخل , لأن الي فهمته انك تبي مثل لون التاج , يعني مثل لون التاج بالشات getPlayerNametagColor الوظيفه الافضل انك تسوي داتا مع التاج. Link to comment
Mr-M3AND Posted January 28, 2014 Author Share Posted January 28, 2014 مالها دخل , لأن الي فهمته انك تبي مثل لون التاج , يعني مثل لون التاج بالشات getPlayerNametagColor الوظيفهالافضل انك تسوي داتا مع التاج. قصدك اعدل على مود التاج واسوي له داتا ؟؟ Link to comment
فاّرس Posted January 28, 2014 Share Posted January 28, 2014 اظن بتكون فيه مشاكل لو كنت حاط اكواد هيكس, كيف ما ضبطت معك؟ getPlayerNametagColor تأكد من الي اعرفه ان الوظيفه تجيب لون النك حق اللاعب , وهذا يعني انها بتضبط ذذ Link to comment
Mr-M3AND Posted January 28, 2014 Author Share Posted January 28, 2014 اظن بتكون فيه مشاكل لو كنت حاط اكواد هيكس,كيف ما ضبطت معك؟ getPlayerNametagColor تأكد من الي اعرفه ان الوظيفه تجيب لون النك حق اللاعب , وهذا يعني انها بتضبط ذذ صحيح المفروض يجيب لون النك لكن الشي الغريب اني ركبت كذا تاج ومايطلع الا لون اللاعب اللي يجي بالتاب مع اني طفيت الفري روم وبلير كولور يبقى اللون موجود Link to comment
!#NssoR_) Posted January 28, 2014 Share Posted January 28, 2014 خخخخخخخخخخخ انت شكلك فاهم الكود غلط هذا الكود getPlayerNametagColor هذا يجيب لون النك ولكن مو النك الي بشات النك الي علي الاعب نفسه مو نك الاعب الي بشات Link to comment
Mr-M3AND Posted January 28, 2014 Author Share Posted January 28, 2014 خخخخخخخخخخخ انت شكلك فاهم الكود غلط هذا الكود getPlayerNametagColor هذا يجيب لون النك ولكن مو النك الي بشات النك الي علي الاعب نفسه مو نك الاعب الي بشات !! طيب ليش ماقلت كذا من البداية ؟؟ كان كلامي واضح فوق قلت ابي لون اللاعب نفس لون تاج الادمنية Link to comment
!#NssoR_) Posted January 28, 2014 Share Posted January 28, 2014 وانا وش دراني انا اصلن مافهمت وش طلبك بس شفت اكوادك وصلحتها Link to comment
iPrestege Posted January 28, 2014 Share Posted January 28, 2014 شوف هالمثال على كودك وتاج باسم الحساب : Client Side : Wnd = {} button = {} GridList = {} function hexToRGB ( hex ) hex = hex:gsub("#","") return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)) end Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.8 ) button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, 1, getPlayerName ( v ), false, false ) local aHex = getElementData ( v,'TAGHexColor' ) local r,g,b = hexToRGB ( aHex ) guiGridListSetItemColor ( GridList[1], row , 1, r, g, b ) end Server Side : addEventHandler ( 'onPlayerChat',root, function ( msg ) if not isGuestAccount ( getPlayerAccount ( source ) ) and getAccountName ( getPlayerAccount ( source ) ) == 'اسم الحسـاب' then cancelEvent ( ) Color = '#00ff00' setElementData ( source,'TAGHexColor',Color ) outputChatBox ( ' '..Color..' [ M3AND ] : '..msg,root,255,255,255,true ) end end ) طبعاً انت عين الداتا اذا سجل دخولة بالحساب عشان تفادياً للاق لكن هذا مثال وترا الداتا تتخزن كل مايتكلم اللاعب! Link to comment
فاّرس Posted January 29, 2014 Share Posted January 29, 2014 خخخخخخخخخخخ انت شكلك فاهم الكود غلط هذا الكود getPlayerNametagColor هذا يجيب لون النك ولكن مو النك الي بشات النك الي علي الاعب نفسه مو نك الاعب الي بشات outputChatBox + getPlayerNametagColor فاهم الكود انا بس حسبته حاط لون التاج بالشات على لون تاج اللاعب بإستخدام Link to comment
!#NssoR_) Posted January 29, 2014 Share Posted January 29, 2014 outputChatBox + getPlayerNametagColor فاهم الكود انا بس حسبته حاط لون التاج بالشات على لون تاج اللاعب بإستخدام ذذذذ انا اكلم مستر معاند Link to comment
Mr-M3AND Posted January 29, 2014 Author Share Posted January 29, 2014 شوف هالمثال على كودك وتاج باسم الحساب :Client Side : Wnd = {} button = {} GridList = {} function hexToRGB ( hex ) hex = hex:gsub("#","") return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)) end Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.8 ) button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, 1, getPlayerName ( v ), false, false ) local aHex = getElementData ( v,'TAGHexColor' ) local r,g,b = hexToRGB ( aHex ) guiGridListSetItemColor ( GridList[1], row , 1, r, g, b ) end Server Side : addEventHandler ( 'onPlayerChat',root, function ( msg ) if not isGuestAccount ( getPlayerAccount ( source ) ) and getAccountName ( getPlayerAccount ( source ) ) == 'اسم الحسـاب' then cancelEvent ( ) Color = '#00ff00' setElementData ( source,'TAGHexColor',Color ) outputChatBox ( ' '..Color..' [ M3AND ] : '..msg,root,255,255,255,true ) end end ) طبعاً انت عين الداتا اذا سجل دخولة بالحساب عشان تفادياً للاق لكن هذا مثال وترا الداتا تتخزن كل مايتكلم اللاعب! طيب انا ابي اسم اللاعب يتلون بلون انا احدده بشرط يكون اللاعب بقروب ادمن معين يعني اذا اللاعب بقروب كونسول يتلون اسمه بالقريد ليست بلون ازرق واذا كان مثلا بقروب ادمن يتلون اسمه بلون احمر Wnd = {} button = {} GridList = {} Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.8 ) button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, column, getPlayerName ( v ), false, false ) guiGridListSetItemColor ( GridList[1], row , column, 0, 0, 255 ) end Link to comment
iPrestege Posted January 29, 2014 Share Posted January 29, 2014 اخوي اعذرني حالياً مشغول جداً راح اسافر ان شاء الله اوصل ما اوصل هناك اساعدك . Link to comment
Mr-M3AND Posted January 29, 2014 Author Share Posted January 29, 2014 اخوي اعذرني حالياً مشغول جداً راح اسافر ان شاء الله اوصل ما اوصل هناك اساعدك . مو مشكلة مايقصرون باقي الاخوان وان شاءالله توصل بالسلامة Link to comment
iPrestege Posted January 30, 2014 Share Posted January 30, 2014 تفضل جرب الكود : Server Side : aGroupsColors = { -- { 'Group Name',r,g,b }, { 'Console', 255,0,0 }, { 'Admin',0,255,0 }, } addEventHandler ( 'onPlayerLogin',root, function ( _,account ) local accName = getAccountName ( account ) for k,v in ipairs ( aGroupsColors ) do for i =1,#aGroupsColors do if isObjectInACLGroup ("user."..accName, aclGetGroup ( aGroupsColors [i][1] ) ) then setElementData ( source,'aRListColor',aGroupsColors [i][2] ) setElementData ( source,'aGListColor',aGroupsColors [i][3] ) setElementData ( source,'aBListColor',aGroupsColors [i][4] ) end end end end ) Client Side : Wnd = {} button = {} GridList = {} Wnd[1] = guiCreateWindow(461,188,162,280,"",false) GridList[1] = guiCreateGridList(0.0556,0.075,0.8889,0.7429,true,Wnd[1]) guiGridListSetSelectionMode(GridList[1],2) guiGridListAddColumn(GridList[1],"player name",0.8 ) button[1] = guiCreateButton(0.0617,0.8393,0.8827,0.1286,"get",true,Wnd[1]) local row = guiGridListAddRow ( GridList[1] ) for i, v in ipairs(getElementsByType("player")) do guiGridListSetItemText ( GridList[1], row, 1, getPlayerName ( v ), false, false ) local aR = getElementData ( localPlayer,'aRListColor' ) local aG = getElementData ( localPlayer,'aGListColor' ) local aB = getElementData ( localPlayer,'aBListColor' ) if aR and aG and aB then guiGridListSetItemColor ( GridList[1], row , 1,aR,aG,aB ) end end Link to comment
Mr-M3AND Posted January 30, 2014 Author Share Posted January 30, 2014 شغلك مضبوط الله يعطيك العافية 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