I'm making a swep that involves speeding up the physics, but when i test it comes up with this: Error, bad server command phys_timescale 2. Heres the code, I don't think that I'm doing it right. [lua] function SWEP:Deploy()
if(SERVER) then end
game.ConsoleCommand("phys_timescale 2")
end
function SWEP:Holster()
if(SERVER) then end
game.ConsoleCommand("phys_timescale 1")
end [/lua]
[QUOTE=Wombo194;20583794]I'm making a swep that involves speeding up the physics, but when i test it comes up with this: Error, bad server command phys_timescale 2. Heres the code, I don't think that I'm doing it right. [lua] function SWEP:Deploy()
if(SERVER) then end
game.ConsoleCommand("phys_timescale 2")
end
function SWEP:Holster()
if(SERVER) then end
game.ConsoleCommand("phys_timescale 1")
end [/lua][/QUOTE]
[lua]
function SWEP:Deploy()
if (SERVER) then
game.ConsoleCommand("phys_timescale 2")
end
end
function SWEP:Holster()
if (SERVER) then
game.ConsoleCommand("phys_timescale 1")
end
end
[/lua]
:science:
It's actually host_timescale, it's kind of misleading. You must also make sure that sv_cheats is set to 1.
[editline]10:34PM[/editline]
[lua]
function SWEP:Deploy()
if (SERVER) then
game.ConsoleCommand("phys_timescale 2\n")
end
end
function SWEP:Holster()
if (SERVER) then
game.ConsoleCommand("phys_timescale 1\n")
end
end
[/lua]
I'm making it so the physics speed up, but the time slows down. I'll try that as soon as I can.
EDIT:
It works now, thank you so much!
Sorry, you need to Log In to post a reply to this thread.