Jump to content

settime


kukimuki

Recommended Posts

I want to make a code that set the time to 14:00 and write in outputchatbox that i changed

function setTime( hour, minute )
	setTime ( 14, 10 )
	outputChatBox("#F70000[Info] #FFFFFFThe time has been set to #96FF2714:00 #FFFFFFby a #0093FFDeveloper!", 247, 0, 0, true)
end
addCommandHandler("noon", setTime)

also i want that when its write by a "Developer" shows the name of that developer or who used the command

Link to comment

If this is client side code you should make something like this

	outputChatBox("#F70000[Info] #FFFFFFThe time has been set to #96FF2714:00 #FFFFFFby a #0093FF"..getPlayerName(localPlayer), 247, 0, 0, true)

This message will be shown only for the player which use command "moon", not for everyone. If you want show this message and set time to the same value for everyone player your should make it on server side.

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