Jump to content

Help in outputChatBox Color


^Dev-PoinT^

Recommended Posts

Hi all i want This To 255,255,0 Color how?

addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if source then 
        if (bodypart == 4) then 
            outputChatBox("#Outch ! " ..getPlayerName(killer).. " has shot in your ass !", source, getRootElement(),255, 255, 255, true) 
        elseif (bodypart == 9)then 
            outputChatBox("#OWNED ! "..getPlayerName(killer).." has shot in your head !", source, getRootElement(), 255, 255, 255, true) 
        else 
            outputChatBox(getPlayerName(killer).."# has kill you ! Now Kill him Noob-_-'", source, getRootElement(), 255, 255, 255, true) 
        end 
    end 
end) 
  
addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if killer then 
        local stars = getPlayerWantedLevel(killer) 
        setPlayerWantedLevel(killer, stars+1) 
        outputChatBox("#You have kill " .. getPlayerName(source) .. ", now you have "..getPlayerWantedLevel(killer).." stars !", killer, getRootElement(), 255, 255, 255, true) 
    end 
end) 

Link to comment

You don't know how to change the output color?

Read the wiki

addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if source then 
        if (bodypart == 4) then 
            outputChatBox("#Outch ! " ..getPlayerName(killer).. " has shot in your ass !", source, getRootElement(),255, 255, 0, true) 
        elseif (bodypart == 9)then 
            outputChatBox("#OWNED ! "..getPlayerName(killer).." has shot in your head !", source, getRootElement(), 255, 255, 0, true) 
        else 
            outputChatBox(getPlayerName(killer).."# has kill you ! Now Kill him Noob-_-'", source, getRootElement(), 255, 255, 0, true) 
        end 
    end 
end) 
  
addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if killer then 
        local stars = getPlayerWantedLevel(killer) 
        setPlayerWantedLevel(killer, stars+1) 
        outputChatBox("#You have kill " .. getPlayerName(source) .. ", now you have "..getPlayerWantedLevel(killer).." stars !", killer, getRootElement(), 255, 255, 0, true) 
    end 
end) 

After getRootElement, there is 3 arguments for RGB color format.

Link to comment

Where the #'s are, you should add the RGB code...

addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if source then 
        if (bodypart == 4) then 
            outputChatBox("#gexcodegoshereOutch ! " ..getPlayerName(killer).. " has shot in your ass !", source, getRootElement(),255, 255, 255, true) 
        elseif (bodypart == 9)then 
            outputChatBox("#hexcodegoeshereOWNED ! "..getPlayerName(killer).." has shot in your head !", source, getRootElement(), 255, 255, 255, true) 
        else 
            outputChatBox(getPlayerName(killer).."#hexcodegoeshere has kill you ! Now Kill him Noob-_-'", source, getRootElement(), 255, 255, 255, true) 
        end 
    end 
end) 
  
addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if killer then 
        local stars = getPlayerWantedLevel(killer) 
        setPlayerWantedLevel(killer, stars+1) 
        outputChatBox("#You have kill " .. getPlayerName(source) .. ", now you have "..getPlayerWantedLevel(killer).." stars !", killer, getRootElement(), 255, 255, 255, true) 
    end 
end) 

You already asked me about this in a PM and I sent it to you. Why not copy that?

Link to comment

You are using two arguments to who output the message.

addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if source then 
        if (bodypart == 4) then 
            outputChatBox("#Outch ! " ..getPlayerName(killer).. " has shot in your ass !", source, 255, 255, 0, true) 
        elseif (bodypart == 9)then 
            outputChatBox("#OWNED ! "..getPlayerName(killer).." has shot in your head !", source, 255, 255, 0, true) 
        else 
            outputChatBox(getPlayerName(killer).."# has kill you ! Now Kill him Noob-_-'", source, 255, 255, 0, true) 
        end 
    end 
end) 
  
addEventHandler("onPlayerWasted", getRootElement(), 
function(ammo, killer, weapon, bodypart) 
    if killer then 
        local stars = getPlayerWantedLevel(killer) 
        setPlayerWantedLevel(killer, stars+1) 
        outputChatBox("#You have kill " .. getPlayerName(source) .. ", now you have "..getPlayerWantedLevel(killer).." stars !", killer, 255, 255, 0, true) 
    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...