This is a wonderful little thing! Let me know of any bugs.
[vid]http://a.pomf.se/xihihx.webm[/vid]
*poot*
[b]Download[/b]
[url=http://steamcommunity.com/sharedfiles/filedetails/?id=284538302]Workshop[/url]
[url=https://github.com/wiox/archive/tree/master/gmod-multi-jump-master]GitHub[/url]
[url=https://github.com/wiox/archive/raw/master/gmod-multi-jump-master/gmod-multi-jump-master.7z]Legacy[/url]
[b]Configuration[/b]
There exists a "multijump_default_jumps" ConVar, which is the amount of extra jumps players get by default.
The default value of this is 1 (for double jump).
You can set this value in your server.cfg. Setting it to 0 will disable double jumps by default (should you wish to).
[b]Pointshop Integration[/b]
Set "multijump_default_jumps" to 0 in your server.cfg.
[code]
ITEM.Name = "Double Jump!"
ITEM.Price = 200
-- I ain't filling every field out for you
function ITEM:OnEquip(ply)
ply:SetMaxJumpLevel(1) -- Enable double jump
end
function ITEM:OnHolster(ply)
ply:SetMaxJumpLevel(0) -- Disable double jump
end
[/code]
I like the little dust particle when you double jump, nice work!
How would you go about changing the velocity up ?
I'm going to make that customizable the exact same way as the extra jumps right now!
[editline]x[/editline]
Alongside a prediction fix to make it work perfectly despite lag.
[QUOTE=Willox;45376227]
Alongside a prediction fix to make it work perfectly despite lag.[/QUOTE]
You're not even networking the jump level, no wonder there's prediction issues :v: , network it with a dt var and not garry's nw vars.
You've got from 0 to 63 as far as DT vars slots go for integers, chances of collision with another addon setting it on the same id on the player are really low.
This is a nice little addon.
There is now a [i]multijump_default_power[/i] ConVar that sets the multiplier for the jump power added when double-jumping (default to 1).
This can also be set on a per-player basis with the PLAYER:SetExtraJumpPower(power) function.
[editline]13th July 2014[/editline]
Also everything is predicted properly now thanks to Jvs.
Attempting to create unknown particle system 'doublejump_smoke'
>_>
[QUOTE=Vincii;45382028]Attempting to create unknown particle system 'doublejump_smoke'
>_>[/QUOTE]
Requires TF2
Makes sense ^_^
wasn't this already made before a long time ago
[QUOTE=PenEnthusiast;45451507]wasn't this already made before a long time ago[/QUOTE]
So? People remake stuff all the time in better ways, double jumps in gmod have always been shit because people can't even figure out how to do it properly, this one hits the spot.
Is there a way to make it so there is better forward and backwards and side to side movement
[QUOTE=npd1124;46467880]Is there a way to make it so there is better forward and backwards and side to side movement[/QUOTE]
Its called PM the OP and don't bump a thread that is 4 months old.
[QUOTE=Neddy;46468295]Its called PM the OP and don't bump a thread that is 4 months old.[/QUOTE]
"Being an arsehole"
Anyway, Great job on this script, most likely will start using it.
*insert generic fart noises*
Awesome, a couple players actually requested this. Thanks!
I love this kind of things. Gonna add it to my server
I love it! Added it to my server! Thanks a lot man!
i bet this took hours to code
-op fixed it-
I have a double jump script I made for my server. This is rather complex version of it but does it catch when players are falling and restrict them from jumping on their fall? You might want to look into that because there are maps like rooftops where people will exploit that. Just a recommendation. I can give you a snippet of code that would help.
EDIT:: gave you the snippet. (this is also not very easy to integrate. there are variables I attach to the player class.)
but just to give you an idea of how i accomplish something similar.
[CODE]if SERVER then
local function doubleJump(ply, key)
if key == IN_JUMP then
if !ply:IsOnGround() then
if ply.FirstJump == 1 and ply.CanDJump == 1 and ply:GetVelocity().z > 0 then
ply:SetVelocity(Vector(0,0,200))
ply.FirstJump = 0
end
else
ply.FirstJump = 1
end
end
end
hook.Add("KeyPress", "doublejump", doubleJump)
end[/CODE]
[QUOTE=SweetTea;46536773]i bet this took hours to code[/QUOTE]
Okay?
[QUOTE=Exho;46538286]Okay?[/QUOTE]
Yes?
[QUOTE=SweetTea;46536773]i bet this took hours to code[/QUOTE]
It took a couple.
[QUOTE='[GT]snowball;46538238']I have a double jump script I made for my server. This is rather complex version of it but does it catch when players are falling and restrict them from jumping on their fall? You might want to look into that because there are maps like rooftops where people will exploit that. Just a recommendation. I can give you a snippet of code that would help.
EDIT:: gave you the snippet. (this is also not very easy to integrate. there are variables I attach to the player class.)
but just to give you an idea of how i accomplish something similar.
[CODE]if SERVER then
local function doubleJump(ply, key)
if key == IN_JUMP then
if !ply:IsOnGround() then
if ply.FirstJump == 1 and ply.CanDJump == 1 and ply:GetVelocity().z > 0 then
ply:SetVelocity(Vector(0,0,200))
ply.FirstJump = 0
end
else
ply.FirstJump = 1
end
end
end
hook.Add("KeyPress", "doublejump", doubleJump)
end[/CODE][/QUOTE]
It doesn't enforce that players not be falling. I'm under the assumption that rooftops will kill players no matter what speed they hit the floor at.
I tried to keep it as close to TF2's implementation as possible, although I don't play TF2 often and have no idea what that really is like.
Just a suggestion cause they way you code lua addons is cleaner than I do. When I code in lua I'm sloppy. I'd like to see if you could implement it because if anything I'd switch my version to yours but there's some things like being able to change velocity and making sure that they cant jump while falling. Again it's up to you how you improve it.
Nice job
Also I can help you with doing effects like water particles and sparks.
i keep getting console spammed with this and so are my players, what can i do to stop it? :Attempting to create unknown particle system 'doublejump_smoke'
Strange i'm not having that issue on our TTT servers. It is working fine and no spam in console.
[QUOTE=carlossc;47322548]i keep getting console spammed with this and so are my players, what can i do to stop it? :Attempting to create unknown particle system 'doublejump_smoke'[/QUOTE]
[QUOTE=Willox;45382062]Requires TF2[/QUOTE]
Or if you don't want to install TF2 just for one particle effect you can change it in the code to one that is already in hl2 or css. for example:
In client>cl_multijump.lua change whatever is in it (probably: "game.AddParticles("particles/doublejumpsmoke.pcf")") to "game.AddParticles("particles/water_impact.pcf")"
Then in multijump.lua change "PrecacheParticleSystem("doublejumpsmoke")" to "PrecacheParticleSystem("water_splash_03")"
and in the same one at the bottom change "ParticleEffect("doublejumpsmoke", ply:GetPos() + Vector(0, 0, 10), ply:GetAngles(), ply)" to "ParticleEffect("water_splash_03", ply:GetPos() + Vector(0, 0, 10), ply:GetAngles(), ply)"
Gives a nice little water effect, not as good as the original but does the job.
Sorry, you need to Log In to post a reply to this thread.