Castillo Posted April 6, 2013 Posted April 6, 2013 outputChatBox("* " .. .." welcome!", source,0,255,0,false) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
GamerDeMTA Posted April 6, 2013 Author Posted April 6, 2013 but I want to put the text says "welcome"
Castillo Posted April 6, 2013 Posted April 6, 2013 See my edited post. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
GamerDeMTA Posted April 6, 2013 Author Posted April 6, 2013 And If i put the otuputchatbox with getRootElement is for all players? getRootElement
tosfera Posted April 6, 2013 Posted April 6, 2013 If you want to output it for every player, just dont give a source in the outputChatBox; outputChatBox("*".. .. " joined the server, welcome!"); If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
GamerDeMTA Posted April 6, 2013 Author Posted April 6, 2013 outputChatBox("* " ..thePlayer.. " Message",getRootElement(),255,0,0,true) And what's wrong with this code?
tosfera Posted April 6, 2013 Posted April 6, 2013 Did you define the variable; thePlayer in the function? + you can use getRootElement() but its not completely used. You are using thePlayer as a name, so you can also change the getRootElement() to thePlayer or even to source. Cause the source of the event onPlayerJoin/onPlayerLogin = the player element. If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
GamerDeMTA Posted April 6, 2013 Author Posted April 6, 2013 Did you define the variable; thePlayer in the function? + you can use getRootElement() but its not completely used. You are using thePlayer as a name, so you can also change the getRootElement() to thePlayer or even to source. Cause the source of the event onPlayerJoin/onPlayerLogin = the player element. This is the full code: [lua] function (thePlayer) local xdd = getPlayerName(thePlayer) outputChatBox("* " ..xdd.. " MESSAGE",getRootElement(),255,0,0,true) end addCommandHandler("OPEN",)
tosfera Posted April 6, 2013 Posted April 6, 2013 function (thePlayer) local xdd = getPlayerName(thePlayer) outputChatBox("* " ..xdd.. " MESSAGE",getRootElement(),255,0,0,true) end addCommandHandler("OPEN",) Keep it simple; addCommandHandler("open", function(source) local playerName = getPlayerName(source); outputChatBox("* ".. playerName .." MESSAGE", source); end); If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now