[Question] Only allow jump height for self?

Posts 1–9 of 9 · Page 1 of 1
[Question] Only allow jump height for self?
HI all,

Is it possible to only allow dvars like jump_height for one person?
using setclientdvar doesn't seem to do the trick.
so if you set jump_height to a certain value, it will apply to everyone.

After three hours of reading and googling I didn't find out how to do this, so I tried to work around this problem with something like this:

Code:
		self notifyOnPlayerCommand( "jump", "+gostand" );
            {
		self waittill( "jump" );
		setDvar("jump_height", 500);
                // ?? //
		wait 1;
		SetDvar("jump_height", 0);

                }
The idea is when this player presses his jump button, the jump height is to 500, the player jumps directly, and the jump height is set back to what it was before right after. This way other players would have to jump at the exact same time as this player in order to have super jump.
However, the way it is now, you need to press jump twice quickly, because the first time, you jump a tiny bit and are pushed down immediately. (try it if you don't understand what I mean)
Only if you quickly press jump again before the 'wait 1' is over do you actually super jump.
Players who do not know this, will not understand how it works.

At the Position '// ?? //' I should be able to set "+gostand" or something like that, so the script makes him jump automatically. But I can't figure out how to force an action.
It sounds simple but I can't find it.
With the same idea you could for example trigger multiple actions with one key. So something like
Code:
		self notifyOnPlayerCommand( "shoot", "+attack" );
            {
		self waittill( "shoot" );
		+attack;
                +gostand;
                }
would make the player jump automatically when firing.

I have been searching online for hours now and can't find it.
Hopefully one of these options is possible.
Thanks in advance if anyone can help me out, and excuse my noobness. I'm still learning.
Toxin = Justin Wiener

/ontopic
I think ju***eight is a server wide dvar so it can't be applied to only one person unless it's changed quickly and no one else jumps at the same time as the VIP.
Dis, Or you set the Jump height while the user holds another key.

~Moved to help, Will look into forcestand/action
@ r_arraz: yes, exactly.
@ Melodia: Thanks for looking into it.
btw, I tried sendcommandtoconsole(1,1,"+stand"); (also with 0,0, and with just "+stand", but that doesn't work.

EDIT:
I was thinking, the autoshoot/autofire function on some aimbots, that's using the 'force action' we are looking for, no?
Do not double post, use the button.
Aye, sir. Got it.
previous post edited, I can't delete it tho..
Quote Originally Posted by Neekokeen View Post
Aye, sir. Got it.
previous post edited, I can't delete it tho..
Only staff can do that
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us