Jump to content

Need little help


DrPhoX

Recommended Posts

Hey, i created VERY simple script but don't work -.- ... I'm beginner on Lua scripting. Can someone help me please?

addEventHandler ("onPlayerJoin", getRootElement(), 
    function(decoration) 
    local decoration = "================================================" 
        outputChatBox(" .. decoration .. ", thePlayer, 38, 98, 188, true) 
        outputChatBox("#ffffffWelcome to #2662bc=(RfC)= #ffffffserver", thePlayer, 38, 98, 188, true) 
        outputChatBox("#ffffffDon't forgot to visit our webiste!", thePlayer, 38, 98, 188, true) 
        outputChatBox("#848484www.website.eu", thePlayer, 38, 98, 188, true) 
        outputChatBox(" .. decoration .. ", thePlayer, 38, 98, 188, true) 
    end 
end) 
  

Link to comment
addEventHandler ("onPlayerJoin", getRootElement(), 
    function(thePlayer) 
    local decoration = "================================================" 
        outputChatBox(decoration, thePlayer, 38, 98, 188, true) 
        outputChatBox("#ffffffWelcome to #2662bc=(RfC)= #ffffffserver", thePlayer, 38, 98, 188, true) 
        outputChatBox("#ffffffDon't forgot to visit our webiste!", thePlayer, 38, 98, 188, true) 
        outputChatBox("#848484www.website.eu", thePlayer, 38, 98, 188, true) 
        outputChatBox(decoration, thePlayer, 38, 98, 188, true) 
    end 
end) 

Try

Link to comment
addEventHandler ("onPlayerJoin", root, 
    function() 
    local decoration = "================================================" 
        outputChatBox(decoration , source, 38, 98, 188, true) 
        outputChatBox("#ffffffWelcome to #2662bc=(RfC)= #ffffffserver", source, 38, 98, 188, true) 
        outputChatBox("#ffffffDon't forgot to visit our webiste!", source, 38, 98, 188, true) 
        outputChatBox("#848484www.website.eu", source, 38, 98, 188, true) 
        outputChatBox(decoration, source, 38, 98, 188, true) 
end) 
  

Link to comment
addEventHandler ("onPlayerJoin", getRootElement(), 
    function(thePlayer) 
    local decoration = "================================================" 
        outputChatBox(decoration, thePlayer, 38, 98, 188, true) 
        outputChatBox("#ffffffWelcome to #2662bc=(RfC)= #ffffffserver", thePlayer, 38, 98, 188, true) 
        outputChatBox("#ffffffDon't forgot to visit our webiste!", thePlayer, 38, 98, 188, true) 
        outputChatBox("#848484www.website.eu", thePlayer, 38, 98, 188, true) 
        outputChatBox(decoration, thePlayer, 38, 98, 188, true) 
    end 
end) 

Try

    end

end)

?

It should be one "end"

Link to comment

lol, try this:

addEventHandler("onPlayerJoin",root,function() -- There's no parameters 
    local decoration = "================================================" 
        outputChatBox(" "..decoration.." ",source, 38, 98, 188, true) -- You need to end the quote then add the string you want, or just put the variable instead of the quotes 
        outputChatBox("#ffffffWelcome to #2662bc=(RfC)= #ffffffserver", source, 38, 98, 188, true) 
        outputChatBox("#ffffffDon't forgot to visit our webiste!", source, 38, 98, 188, true) 
        outputChatBox("#848484www.website.eu", source, 38, 98, 188, true) 
        outputChatBox(" ".. decoration .." ", source, 38, 98, 188, 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...