game.ConsoleCommand does not work on a dedicated server?
11 replies, posted
game.ConsoleCommand does not work on a dedicated server?
I am running a dedicated server, and this command does not work :(. I think it is because
the actual server is no player inside the game itself.
OR am I doing something wrong, and does work it?
Use
RunConsoleCommand( "Command", Arg )
do i need to set a target infront of it? or is it just executed by the one using the script?
Like finding all players as v
V:RunConsoleCommand( "Command", Arg )
or just like
if SERVER then
RunConsoleCommand( "Command", Arg )
end
Maybe you forgot a newline at the end of the command
game.ConsoleCommand("command arg1 arg2\n")
[QUOTE=_axe_;24057256]do i need to set a target infront of it? or is it just executed by the one using the script?
Like finding all players as v
V:RunConsoleCommand( "Command", Arg )
or just like
if SERVER then
RunConsoleCommand( "Command", Arg )
end[/QUOTE]
It's only executed by the one using the script. You need to use v:ConCommand("command " .. argument) if you want to execute commands for one player.
[QUOTE=DarKSunrise;24057812]It's only executed by the one using the script. You need to use [highlight]v:ConCommand("command ".. argument)[/highlight] if you want to execute commands for one player.[/QUOTE]
Fixed
[QUOTE=Cubar;24059529]Fixed[/QUOTE]
no
why do you hang around here so much, I can't tell if you're a troll or just retarded when it comes to lua
[editline]02:08PM[/editline]
It's ply:ConCommand("str")
RunConsoleCommand("sv_cheats", 1)
Like that :P
[QUOTE=Nexus435;24059921]no
why do you hang around here so much, I can't tell if you're a troll or just retarded when it comes to lua
[editline]02:08PM[/editline]
It's ply:ConCommand("command", arg1(opt), arg2(opt))[/QUOTE]
I thought you was the only Retard on facepunch Connor.
[lua]
lua_run_cl LocalPlayer():ConCommand("say", "nexus", " is dumb")
ConCommand Ran: say
lua_run_cl LocalPlayer():ConCommand("say", " Nexus fag tried to prove me wrong")
ConCommand Ran: say
lua_run_cl LocalPlayer():ConCommand("say ".."nexus".." is dumb")
ConCommand Ran: say nexus is dumb
Cubar: nexus is dumb
lua_run_cl RunConsoleCommand("say", "nexus", "is dumb")
RunConsoleCommand Ran : say nexus is dumb
Cubar: nexus is dumb
[/lua]
Proving idiots wrong since earth started, Enough said Idiot.
Wizey is correct, except sv_cheats is blocked in RCC.
I love how that is fake "nexus".."is dumb" would come out as "nexusis dumb"
I did put a space in the gmod console lol but forgot to change it on the forums whoops thanks for notifying me, the RunConsoleCommand spaces it out anyway.
[QUOTE=Cubar;24062454]I did put a space in the gmod console lol but forgot to change it on the forums whoops thanks for notifying me, the RunConsoleCommand spaces it out anyway.[/QUOTE]
copy and paste always messes up spaces in the middle of lines
and
pl:ConCommand("say I shure a dumb")
Sorry, you need to Log In to post a reply to this thread.