Jump to content

تكرار الكلام


Recommended Posts

السسلام عليكم

الان ركبت كود الاخ سفاح على التاج ذا

    function chatbox(text, msgtype) 
    local r,g,b = getPlayerNametagColor(source) 
    local name = getPlayerName(source) 
    local accountname = getAccountName (getPlayerAccount(source)) 
    local Account = getPlayerAccount ( source ) 
    if (msgtype == 0) then 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ) ) then 
    cancelEvent() 
    outputChatBox("#ff0000* #777777[Console] "..RGBToHex(r,g,b)..name..": #ffff33"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [HeadAdmin] " .. getPlayerName ( source ).. ": " .. text) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level4" ) ) then 
    cancelEvent() 
    outputChatBox("#ff0000* #777777[HeadLeader] "..RGBToHex(r,g,b)..name..": #ffff33"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [superModerator] " .. getPlayerName ( source ).. ": " .. text ) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level1" ) ) then 
    cancelEvent() 
    outputChatBox("#ff0000*#777777 [st-War] "..RGBToHex(r,g,b)..name..": #ffff33"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Moderator] " .. getPlayerName ( source ).. ": " .. text ) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level2" ) ) then 
    cancelEvent() 
    outputChatBox("#cc0000* [LVL2] "..RGBToHex(r,g,b)..name..": #ffff00"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Console] " .. getPlayerName ( source ).. ": " .. text ) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level" ) ) then 
    cancelEvent() 
    if isGuestAccount ( Account ) then 
    outputChatBox("#cc0000* [LVL1] "..RGBToHex(r,g,b)..name..": #ffff00"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Guest] " .. getPlayerName ( source ).. ": " .. text ) 
    else 
    outputChatBox(""..RGBToHex(r,g,b)..name..": #ffffff"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Player] " .. getPlayerName ( source ).. ": " .. text ) 
    end 
    end 
    end 
    end 
    addEventHandler("onPlayerChat", getRootElement(), chatbox) 
-----------------------------------------------------------------------------------------    
function RGBToHex(red, green, blue, alpha) 
    if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then 
        return nil 
    end 
    if(alpha) then 
        return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) 
    else 
        return string.format("#%.2X%.2X%.2X", red,green,blue) 
    end 
end 

وركبت كود سفاح عليك

addEventHandler ("onPlayerChat",root, 
 function (msg) 
 team = getPlayerTeam ( source ) 
 Name = getPlayerName ( source ) 
  if ( team ) then 
  r,b,g = getTeamColor ( team ) 
  cancelEvent (  ) 
  outputChatBox (""..Name..": #FFFFFF"..msg, root, r, b, g, true ) 
        end 
   end 
 ) 

صار يكرر الكلام

Link to comment
  
  function chatbox(text, msgtype) 
    local r,g,b = getPlayerNametagColor(source) 
    local name = getPlayerName(source) 
    local accountname = getAccountName (getPlayerAccount(source)) 
    local Account = getPlayerAccount ( source ) 
    if (msgtype == 0) then 
    if ( getPlayerTeam ( source ) ) then 
    cancelEvent() 
    local x,xx,xxx = getTeamColor ( getPlayerTeam ( source ) ) 
    outputChatBox (""..getPlayerName ( source ) ..": #FFFFFF"..text, root, x,xx,xxx, true ) 
    else 
    if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Console" ) ) then 
    cancelEvent() 
    outputChatBox("#ff0000* #777777[Console] "..RGBToHex(r,g,b)..name..": #ffff33"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [HeadAdmin] " .. getPlayerName ( source ).. ": " .. text) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level4" ) ) then 
    cancelEvent() 
    outputChatBox("#ff0000* #777777[HeadLeader] "..RGBToHex(r,g,b)..name..": #ffff33"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [superModerator] " .. getPlayerName ( source ).. ": " .. text ) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level1" ) ) then 
    cancelEvent() 
    outputChatBox("#ff0000*#777777 [st-War] "..RGBToHex(r,g,b)..name..": #ffff33"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Moderator] " .. getPlayerName ( source ).. ": " .. text ) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level2" ) ) then 
    cancelEvent() 
    outputChatBox("#cc0000* [LVL2] "..RGBToHex(r,g,b)..name..": #ffff00"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Console] " .. getPlayerName ( source ).. ": " .. text ) 
    elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Level" ) ) then 
    cancelEvent() 
    if isGuestAccount ( Account ) then 
    outputChatBox("#cc0000* [LVL1] "..RGBToHex(r,g,b)..name..": #ffff00"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Guest] " .. getPlayerName ( source ).. ": " .. text ) 
    else 
    outputChatBox(""..RGBToHex(r,g,b)..name..": #ffffff"..text, getRootElement(),0,0,0,true) 
    outputServerLog( "CHAT: [Player] " .. getPlayerName ( source ).. ": " .. text ) 
    end 
    end 
    end 
    end 
    end 
    addEventHandler("onPlayerChat", getRootElement(), chatbox) 
     
    function RGBToHex(red, green, blue, alpha) 
    if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then 
        return nil 
    end 
    if(alpha) then 
        return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) 
    else 
        return string.format("#%.2X%.2X%.2X", red,green,blue) 
    end 
end 

Edited by Guest
Link to comment

مأفهمت الخبطه بـ اللوان ؟

الكود ظآبط معي , + لاتنسى أنك حأط

function RGBToHex(red, green, blue, alpha) 
    if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then 
        return nil 
    end 
    if(alpha) then 
        return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) 
    else 
        return string.format("#%.2X%.2X%.2X", red,green,blue) 
    end 
end 

edit :

شوف عدلته فوق .

Link to comment
local root = getRootElement() 
  
function chatbox(text, msgtype) 
    local account = getAccountName(getPlayerAccount(source)) 
    local name = getPlayerName(source) 
 cancelEvent() 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then 
        outputChatBox("#FF8C00[Console]#FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("console")) then 
        outputChatBox("#FF0000[Admin]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true)  
  
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Developer")) then 
        outputChatBox("#A9A9A9[Developer]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
    
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then 
        outputChatBox("#B40404[Moderator]" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Add[sWAT]")) then 
        outputChatBox("#01DF01*Manger]" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Event")) then 
        outputChatBox("#900101*[Admin-Events]" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then 
        outputChatBox("#F778A1°•~█|мὄḋἔʀᾄҭὄʀῥʀὄ|█~•°#FFFFFF#ff0000" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
     
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then 
        outputChatBox("#A5A5A5*[Admin]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
     
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL5]")) then 
        outputChatBox("#ff0000[LvL_5]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL4]")) then 
        outputChatBox("#ff0000[LvL_4]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL3]")) then 
        outputChatBox("#ff0000[LvL_3]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL2]")) then 
        outputChatBox("#ff0000[LvL_2]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL1]")) then 
        outputChatBox("#ff0000[LvL_1]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then 
        outputChatBox("#15317E~°•~VIP_~•°" .. name .. ":#FF00FF " .. text, root, 255, 255, 255, true) 
        end 
end 
addEventHandler("onPlayerChat", root, chatbox)   

بالله عليك سوي التعديل ع التاج ذا

واي شي مو مهم بالتاج احذفة ذذ

Link to comment
local root = getRootElement() 
  
  
addEventHandler('onPlayerChat',root, function ( text ) 
name = getPlayerName ( source )  
account = getAccountName ( getPlayerAccount ( source ) ) 
if ( getPlayerTeam ( source ) ) then 
local r,g,b = getTeamColor ( getPlayerTeam ( source ) )  
cancelEvent ( ) 
outputChatBox(''..getPlayerName(source)..': #FFFFFF'..text..'',root,r,g,b,true) 
else 
 cancelEvent() 
    if isObjectInACLGroup("user." .. account, aclGetGroup("Console")) then 
        outputChatBox("#FF8C00[Console]#FFFFFF" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("console")) then 
        outputChatBox("#FF0000[Admin]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Developer")) then 
        outputChatBox("#A9A9A9[Developer]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
    
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then 
        outputChatBox("#B40404[Moderator]" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Add[sWAT]")) then 
        outputChatBox("#01DF01*Manger]" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Event")) then 
        outputChatBox("#900101*[Admin-Events]" .. name ..":#FFFFFF " .. text, root, 255, 255, 255, true) 
        
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then 
        outputChatBox("#F778A1°•~█|мὄḋἔʀᾄҭὄʀῥʀὄ|█~•°#FFFFFF#ff0000" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
    
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then 
        outputChatBox("#A5A5A5*[Admin]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
    
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL5]")) then 
        outputChatBox("#ff0000[LvL_5]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL4]")) then 
        outputChatBox("#ff0000[LvL_4]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL3]")) then 
        outputChatBox("#ff0000[LvL_3]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL2]")) then 
        outputChatBox("#ff0000[LvL_2]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("[LVL1]")) then 
        outputChatBox("#ff0000[LvL_1]" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
  
    elseif isObjectInACLGroup("user." .. account, aclGetGroup("VIP")) then 
        outputChatBox("#15317E~°•~VIP_~•°" .. name .. ":#FF00FF " .. text, root, 255, 255, 255, true) 
        end 
    end 
end) 

Link to comment

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...