I am a complete stupid noob and I don’t know shit all about what to do.
That’s why I’m asking here.
I’m trying to get a BHop script onto a server,
So I made a text document and put the following into it:
local function BHop(ucmd) //Begin declaring a function if not(ShouldBHop:GetInt() == 0) then //If we're supposed to bhop if LocalPlayer():OnGround() then //And we're on the ground ucmd:SetButtons( ucmd:GetButtons() | IN_JUMP ) //Then add IN_JUMP to our current keys. end //End if end //End if end //End function hook.Add("CreateMove" , "BHop", BHop) //Hook the function to "CreateMove" ShouldBHop = CreateClientConVar("bunnyhop", 0, true, false) //Create a client convar concommand.Add("+bunnyhop" , function() //Make a new console command, +bunnyhop RunConsoleCommand("bunnyhop" , 1) end ) concommand.Add("-bunnyhop" , function() //Make a new console command, -bunnyhop RunConsoleCommand("bunnyhop" , 0) end )
I saved it as “Bunnyhop.lua”
And put it in garrysmod/lua/autorun/client
I then went into the server and I binded the key by going
bind space +bunnyhop
I press the key and I get this:
Unknown Command: ‘+bunnyhop’
Unknown Command: ‘-bunnyhop’
What am I doing wrong?