So heres my code: [CODE]concommand.Add( "NovaSuperSpeed", function( ply, cmd, args )
RunConsoleCommand("walkOnWater", "1")
game.SetTimeScale(0.03)
player:SetLaggedMovementValue(38)
player:SetJumpPower( 443 ) -
RunConsoleCommand("sv_defaultdeployspeed", "70")
if slow == 0 then
self.Owner:ChatPrint ("Let's run!") -- You see stephano? This is what happens!
slow = 1
if PlayMusic == 1 then
if math.random (1, 2) == 1 then
self.Owner:EmitSound("music/TimeBottle.mp3")
else
self.Owner:EmitSound("music/SweetDreams.mp3")
end
else
self.Owner:ChatPrint ("Looks your already going fast kid!")
end
elseif PlayMusic == 0 then
self.Owner:ChatPrint ("Music is disabled :)")
end
end)
concommand.Add( "NovaNormalSpeed", function( ply, cmd, args )
RunConsoleCommand("walkOnWater", "0")
game.SetTimeScale(1)
RunConsoleCommand( "Stopsound")
self.Owner:SetJumpPower( 200 )
RunConsoleCommand("sv_defaultdeployspeed", "1")
self.Owner:SetLaggedMovementValue(1)
slow = 0
moo = 0
end)[/CODE]
I'm getting the error: [CODE]
[ERROR] addons/quicksilver/lua/weapons/weapon_quicksilver_mod/shared.lua:143: attempt to call method 'SetLaggedMovementValue' (a nil value)
1. unknown - addons/quicksilver/lua/weapons/weapon_quicksilver_mod/shared.lua:143
2. unknown - lua/includes/modules/concommand.lua:54
[/CODE]
Line 143 is [CODE]player:SetLaggedMovementValue(38)[/CODE]
Any help would be appreciated :)
Your concommand is in a shared file, so the command is being executed on both the server and client.
The function SetLaggedMoementValue does not exist on the client.
[QUOTE=Z0mb1n3;50806613]Your concommand is in a shared file, so the command is being executed on both the server and client.
The function SetLaggedMoementValue does not exist on the client.[/QUOTE]
Oh, ok. But if this is the case, why does it work when you place it on a weapons PrimaryAttack function? Thanks
[QUOTE=tcmaxwell2;50812170]Oh, ok. But if this is the case, why does it work when you place it on a weapons PrimaryAttack function? Thanks[/QUOTE]
It'll only work in single-player since PrimaryAttack is only called serverside in single-player.
[QUOTE=code_gs;50812185]It'll only work in single-player since PrimaryAttack is only called serverside in single-player.[/QUOTE]
Ah, Ok thanks!
Sorry, you need to Log In to post a reply to this thread.