bhop script

Posts 18 of 8 · Page 1 of 1
bhop script
is there an gmod bunny hop lua script out there? i havent managed to find one yet :C
Give me a min and I'll make one.

It's probably not the best, but I'm new to this.
Code:
local ihop = false
hook.Add("Think", "ihop", function()
if ihop then
     if (input.IsKeyDown( KEY_SPACE ) ) then
        if LocalPlayer():IsOnGround() then
            RunConsoleCommand("+jump")
            HasJumped = 1
        else
            RunConsoleCommand("-jump")
            HasJumped = 0
        end
    elseif ihop and LocalPlayer():IsOnGround() then
        if HasJumped == 1 then
            RunConsoleCommand("-jump")
            HasJumped = 0
        end
    end
end
end)

concommand.Add("ihop_toggle", function()
if ihop then
    ihop = !ihop
    LocalPlayer():ChatPrint("iHop turned OFF")
else
    ihop = !ihop
    LocalPlayer():ChatPrint("iHop turned ON")
end
end)
i get this kind of error....

Quote Originally Posted by Console
[ERROR] LuaCmd:1: '=' expected near '<eof>'
1. unknown - LuaCmd:0
wow i think i am giving u a headache inferior... i have noted you about everything today....


EDIT: Ok i as using wrong command for running the script... im a dumbass
Quote Originally Posted by makee View Post
i get this kind of error....



wow i think i am giving u a headache inferior... i have noted you about everything today....
Code:
if CLIENT then
	concommand.Add("+bhop",function()
		hook.Add("Think","hook",function()
			RunConsoleCommand(((LocalPlayer():IsOnGround() or LocalPlayer():WaterLevel() > 0) and "+" or "-").."jump")
		end)
	end)

	concommand.Add("-bhop",function()
		RunConsoleCommand("-jump")
		hook.Remove("Think","hook")
	end)
end

in console: bind space +bhop

Have fun ;3
it just spams the console whit
table: 0x12af0fd8
table: 0x2bc94c10
table: 0x2c8fcef8
table: 0x2ca1bfb8
table: 0x2ca1e840
table: 0x12ab0af8
table: 0x29d7edf0
table: 0x2bf900e8
table: 0x2c533ed8
table: 0x2c92b430


and unknown command +bhop and -bhop

EDIT: Oh i see what u did there.... great just little change to the code and it worked..
Do you know how to save .lua filles?

Edit: Copy code, make a new fille paste this code there, save it as bhop.lua or whatever do you want but remember you must have at the end .lua.
Then take this file and place in garrysmod/garrysmod/LUA
Go to server, enable your lua_openscript_cl bypasser, then type in console: lua_openscript_cl bhop.lua, then in console bind space +bhop
Quote Originally Posted by coca12345 View Post
Do you know how to save .lua filles?
add .lua at the end I guess?
i did get it to work thanks

---------- Post added at 02:39 PM ---------- Previous post was at 02:31 PM ----------

Quote Originally Posted by coca12345 View Post
Do you know how to save .lua filles?

Edit: Copy code, make a new fille paste this code there, save it as bhop.lua or whatever do you want but remember you must have at the end .lua.
Then take this file and place in garrysmod/garrysmod/LUA
Go to server, enable your lua_openscript_cl bypasser, then type in console: lua_openscript_cl bhop.lua, then in console bind space +bhop
im not an idiot i already figured it out as i have said 30 times
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?