Jump to content

وش الغلط هنا ؟


G.KinG

Recommended Posts

ما دام المووضوع مفتوح بكمل عليه عشان ما نفتح موضوع جديد وسالفه , :]

معي كود التاج بس المشكله لما اهرج في الشات ما يطلع التاج الي قبل اسم الاعب , وذا هو الكود <>

elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then 
cancelEvent () 
outputChatBox("[Everyone] " .. playercolor .. "" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
outputServerLog("[Everyone] " .. name .. ": " .. text) 
local team = getPlayerTeam(source) 
for k,v in ipairs(getElementsByType("player")) do 
local team2 = getPlayerTeam(v) 
if team == team2 then 
outputChatBox ( "#FFFFFF(TEAM) "..name.. ": #FFFFFF" .. text, v, 255,255,255, true ) 
end 
end) 

Link to comment

-_-"

addEventHandler("onPlayerChat",root, 
function (text,root) 
local account = getAccountName(getPlayerAccount(source)) 
local name = getPlayerName(source) 
local root = getRootElement() 
local color1, color2, color3 = getPlayerNametagColor(source) 
local playercolor = string.format("#%02X%02X%02X", color1, color2, color3) 
if isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then 
cancelEvent () 
outputChatBox("[Everyone] " .. playercolor .. "" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) 
outputServerLog("[Everyone] " .. name .. ": " .. text) 
local team = getPlayerTeam(source) 
for k,v in ipairs(getElementsByType("player")) do 
local team2 = getPlayerTeam(v) 
if team == team2 then 
outputChatBox ( "#FFFFFF(TEAM) "..name.. ": #FFFFFF" .. text, v, 255,255,255, true ) 
end 
end) 

Link to comment

ناقص في أكثر من مكان end عندك

جرب :

addEventHandler( "onPlayerChat", root, 
    function( text,root ) 
        local account = getAccountName( getPlayerAccount( source ) ) 
        local name = getPlayerName( source ) 
        local color1, color2, color3 = getPlayerNametagColor( source ) 
        local playercolor = string.format ("#%02X%02X%02X", color1, color2, color3 ) 
        if isObjectInACLGroup( "user." .. account, aclGetGroup( "Everyone" ) ) then 
            cancelEvent( ) 
            outputChatBox( "[Everyone] " .. playercolor .. "" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true ) 
            outputServerLog( "[Everyone] " .. name .. ": " .. text ) 
            local team = getPlayerTeam( source ) 
            for k,v in ipairs( getElementsByType( "player" ) ) do 
                local team2 = getPlayerTeam( v ) 
                if team == team2 then 
                    outputChatBox ( "#FFFFFF(TEAM) "..name.. ": #FFFFFF" .. text, v, 255,255,255, true ) 
                end 
            end 
        end 
    end 
) 

* ياليت ترتب أكوادك, أسهلك و أسهلنا

Link to comment

هذي مو أخطاء من كودي, هذي أشياء انت حاطها في الكود

أنا بس رتبته + أضفت الإندات الناقصة

عالعموم, جرب ذا :

addEventHandler( "onPlayerChat", root, 
    function( text ) 
        local account = getAccountName( getPlayerAccount( source ) ) 
        local name = getPlayerName( source ) 
        local color1, color2, color3 = getPlayerNametagColor( source ) 
        local playercolor = string.format ("#%02X%02X%02X", color1, color2, color3 ) 
        if isObjectInACLGroup( "user." .. account, aclGetGroup( "Everyone" ) ) then 
            cancelEvent( ) 
            outputChatBox( "[Everyone] " .. playercolor .. "" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true ) 
            outputServerLog( "[Everyone] " .. name .. ": " .. text ) 
        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...