[DMC] Posted September 4, 2010 Share Posted September 4, 2010 function pinksky ( thePlayer ) if ( hasObjectPermissionTo ( thePlayer, "command.stopall", true ) ) then setSkyGradient( 200, 0, 100, 150, 0, 70 ) outputChatBox(getPlayerName(thePlayer).." Changed the sky color to pink!", getRootElement(), 255, 255, 0, true) end end addCommandHandler ( "setsky pink", pinksky ) hey i just made this and its really easy so idk why its not working NO errors in debugscript 3 Link to comment
megaman54 Posted September 4, 2010 Share Posted September 4, 2010 I think addCommandHandler is wrong because the command cannot be with a space on it. put it "setskypink" then try it out. Link to comment
CowTurbo Posted September 6, 2010 Share Posted September 6, 2010 you can use setsky_pink too, but make sure, you are logged in, and you are admin. Link to comment
J.S. Posted September 7, 2010 Share Posted September 7, 2010 http://lua.pastebin.com/RULVuAuu Also, if your intent is to send the message to every player online, getRootElement() will not suffice. Link to comment
12p Posted September 8, 2010 Share Posted September 8, 2010 function pinksky ( thePlayer ) if hasObjectPermissionTo (thePlayer, "command.stopall") == true then setSkyGradient(200, 0, 100, 150, 0, 70) outputChatBox(getPlayerName(thePlayer).." changed the sky color to pink!", getRootElement(), 255, 255, 0, true)--"true" is not necessary in this case (colorCoded? You don't use Hex. color codes), maybe delete it to have less characters? end end addCommandHandler ("setskypink", pinksky) This is correct, I think. Link to comment
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