Calling serverside concommands on the client.

[lua]function SetTime(ply, cmd, arg) --This concommand changes the world time. daylight.minute is the current world time.
local time = arg[1]

if ply:Team() == 2 then
	if ply:CanAfford(GetConVar("arena_timechangecost"):GetInt()) then
		daylight.minute = time

concommand.Add(“arena_settime”, SetTime)[/lua]

This command HAS to be placed on a serverside file, but it is meant to be run by a player.
Problem is, when I run it, nothing happens and it says UNKNOWN COMMAND.

If I’m correct, the only way to get info from the client to the server is through concommands. How can I get this concommand to work then?

You can also use datastream.

Anyways to run the command, just do RunConsoleCommand(“coolbeans”)

I head datastream will be removed by the release of the beta.

Also, is there a way to run it by actually typing it in console instead of only though lua?

Either do what I said above or type the command into the console.

Well see that’s the problem. The command isn’t showing up for the client. When I type it out and run it it just tells me the concommand doesn’t exist.

Check if the script is being ran, and if there are any errors.

Suddenly it works. Thanks anyway! :slight_smile: