Jump to content

TagColor


Mr-M3AND

Recommended Posts

Posted

السلام عليكم

لاهنتو شباب هذا كود القريد ليست اسماء اللاعبين ابي الون اسماء اللاعبين نفس لون تاج الادمنية الخاص بكل لاعب بس مايطلع معي الا لون التاج الاصلي للعبه مع

.. هل من حل , 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 

Posted

جرب #

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 

Posted
جرب #
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 

ماتغير شي

Posted

توي جربته وشغال معي زي العسل !

يجي عندي نفس اللون اللي بالتاب جربت اكثر من تاج ماضبط معي

Posted

هو يبي ان لون التاج يجي في اسماء القريد لست

مثلآ التاج لونة " ازرق " يجي اسم الاعبين ازرق في القريد لست

هذه والله اعلم !

Posted
يبي * . اسم الاعب في القريد ليست على لون تاجة فهمت
لاهنتو شباب هذا كود القريد ليست اسماء اللاعبين ابي الون اسماء اللاعبين نفس لون تاج الادمنية الخاص بكل لاعب بس مايطلع معي الا لون التاج الاصلي للعبه مع

.. هل من حل , player colors و freeroam اني قفلت ال

Posted

مالها دخل , لأن الي فهمته انك تبي مثل لون التاج , يعني مثل لون التاج بالشات getPlayerNametagColor الوظيفه

الافضل انك تسوي داتا مع التاج.

Posted
مالها دخل , لأن الي فهمته انك تبي مثل لون التاج , يعني مثل لون التاج بالشات getPlayerNametagColor الوظيفه

الافضل انك تسوي داتا مع التاج.

قصدك اعدل على مود التاج واسوي له داتا ؟؟

Posted

اظن بتكون فيه مشاكل لو كنت حاط اكواد هيكس,

كيف ما ضبطت معك؟ getPlayerNametagColor تأكد من

الي اعرفه ان الوظيفه تجيب لون النك حق اللاعب , وهذا يعني انها بتضبط ذذ

Posted
اظن بتكون فيه مشاكل لو كنت حاط اكواد هيكس,

كيف ما ضبطت معك؟ getPlayerNametagColor تأكد من

الي اعرفه ان الوظيفه تجيب لون النك حق اللاعب , وهذا يعني انها بتضبط ذذ

صحيح المفروض يجيب لون النك لكن الشي الغريب اني ركبت كذا تاج ومايطلع الا لون اللاعب اللي يجي بالتاب مع اني طفيت الفري روم وبلير كولور يبقى اللون موجود

Posted

خخخخخخخخخخخ انت شكلك فاهم الكود غلط

هذا الكود getPlayerNametagColor

هذا يجيب لون النك ولكن مو النك الي بشات النك الي علي الاعب نفسه مو نك الاعب الي بشات

Posted

خخخخخخخخخخخ انت شكلك فاهم الكود غلط

هذا الكود getPlayerNametagColor

هذا يجيب لون النك ولكن مو النك الي بشات النك الي علي الاعب نفسه مو نك الاعب الي بشات

!! طيب ليش ماقلت كذا من البداية ؟؟ كان كلامي واضح فوق قلت ابي لون اللاعب نفس لون تاج الادمنية

Posted

شوف هالمثال على كودك وتاج باسم الحساب :

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  
) 

طبعاً انت عين الداتا اذا سجل دخولة بالحساب عشان تفادياً للاق لكن هذا مثال وترا الداتا تتخزن كل مايتكلم اللاعب!

Posted

خخخخخخخخخخخ انت شكلك فاهم الكود غلط

هذا الكود getPlayerNametagColor

هذا يجيب لون النك ولكن مو النك الي بشات النك الي علي الاعب نفسه مو نك الاعب الي بشات

outputChatBox + getPlayerNametagColor فاهم الكود انا بس حسبته حاط لون التاج بالشات على لون تاج اللاعب بإستخدام

Posted
شوف هالمثال على كودك وتاج باسم الحساب :

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 
  

Posted
اخوي اعذرني حالياً مشغول جداً راح اسافر ان شاء الله اوصل ما اوصل هناك اساعدك .

مو مشكلة مايقصرون باقي الاخوان وان شاءالله توصل بالسلامة

Posted

تفضل جرب الكود :

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 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...