Jump to content

how to make hex codes work?


Wei

Recommended Posts

g_Root = getRootElement() 
  
addEventHandler('onPlayerJoin', g_Root, 
    function() 
        outputChatBox("* #FF4000'" .. getPlayerName(source) .. "'#00FF00 has joined the game", 0, 255, 0, true) 
    end 
) 

Link to comment

i used this in my [DM] map and it worked.

  
function startclient() 
    outputChatBox ("#7CFC00[Map]#AAAAAA You're now playing: [DM] #7CFC00Xeno#AAAAAA II - Bounce" , 255, 0, 0, true) 
    outputChatBox ("#7CFC00[Map]#AAAAAA Music: Calvin Harris ft. Kelis - #7CFC00Bounce" , 255, 0, 0, true) 
    outputChatBox ("#7CFC00[Map]#AAAAAA Press #7CFC00'M'#AAAAAA to toggle music on/off" , 255, 0, 0, true) 
    outputChatBox ("#7CFC00[Map]#AAAAAA Goodluck and have #7CFC00Fun!" , 255, 0, 0, true) 
end 
  
addEventHandler("onClientResourceStart", getRootElement(), startclient) 

Link to comment

I ain't good in Lua, but try it:

-- Show message only to the player who called 
g_Root = getRootElement() 
      
    addEventHandler('onPlayerJoin', g_Root, 
        function() 
            outputChatBox("* #FF4000'" .. getPlayerName(source) .. "'#00FF00 has joined the game", source, 0, 255, 0, true) 
        end 
    ) 

Or try it:

-- Show message to all the players online 
g_Root = getRootElement() 
      
    addEventHandler('onPlayerJoin', g_Root, 
        function() 
            outputChatBox("* #FF4000'" .. getPlayerName(source) .. "'#00FF00 has joined the game", root, 0, 255, 0, true) 
        end 
    ) 

Link to comment
  g_Root = getRootElement() 
          
        addEventHandler('onPlayerJoin',g_Root, 
        function () 
            outputChatBox('#ffffff ' .. getPlayerName(source) .. '#ffffff has joined the game!', getRootElement(), 255, 255, 255, true) 
            end 
        ) 

Link to comment
I ain't good in Lua, but try it:
-- Show message only to the player who called 
g_Root = getRootElement() 
      
    addEventHandler('onPlayerJoin', g_Root, 
        function() 
            outputChatBox("* #FF4000'" .. getPlayerName(source) .. "'#00FF00 has joined the game", source, 0, 255, 0, true) 
        end 
    ) 

Or try it:

-- Show message to all the players online 
g_Root = getRootElement() 
      
    addEventHandler('onPlayerJoin', g_Root, 
        function() 
            outputChatBox("* #FF4000'" .. getPlayerName(source) .. "'#00FF00 has joined the game", root, 0, 255, 0, true) 
        end 
    ) 

In 2 code i dont add root in the end and all work..but try this 2 scripts blazy

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