AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Block player moving (https://forums.alliedmods.net/showthread.php?t=147175)

Ryokin 01-06-2011 04:14

Block player moving
 
how to block player moving (include jump) but sill can set his velocity ?
need help

GXLZPGX 01-06-2011 04:20

Re: Block player moving
 
Quote:

Originally Posted by Ryokin (Post 1387224)
how to block player moving (include jump) but sill can set his velocity ?
need help

set_pev( index, pev_maxspeed, -1.0 ) to disable moving, you'll have to check if the user is jumping in prethink in order to block the jumping.

Edit: set_pev is a fakemeta function, so you MUST include fakemeta.

wrecked_ 01-06-2011 15:17

Re: Block player moving
 
Quote:

Originally Posted by GXLZPGX (Post 1387228)
you'll have to check if the user is jumping in prethink in order to block the jumping.

You disappoint me, grasshopper.

PreThink is definitely not the way to go. FM_CmdStart is a healthy alternative.

Arkshine 01-06-2011 15:23

Re: Block player moving
 
Not -1.0 but 1.0. But it won't block jumping.

GXLZPGX 01-06-2011 16:13

Re: Block player moving
 
Quote:

Originally Posted by wrecked_ (Post 1387580)
You disappoint me, grasshopper.

PreThink is definitely not the way to go. FM_CmdStart is a healthy alternative.

I'm sorry master..

Quote:

Originally Posted by Arkshine (Post 1387585)
Not -1.0 but 1.0. But it won't block jumping.

I learned to set it to -1.0 from Wrecked. Because even if 1.0 seems like it blocks movement, you're still somewhat moving, just at a VERY slow pace.

Arkshine 01-06-2011 16:37

Re: Block player moving
 
1.0 is used at freeze time by CS, you don't move and it looks more neat, meaning without shaking. But anyway it's useless because once you switch weapon, the speed will be reseted. You have to either forbid the weapon switch or hooking ResetMaxSpeed.

gladius 01-06-2011 16:52

Re: Block player moving
 
maybe FL_FROZEN ?

Arkshine 01-06-2011 16:58

Re: Block player moving
 
Yes, you can use that instead, though If I remember it still won't block the jump.

lazarev 01-06-2011 17:26

Re: Block player moving
 
Quote:

Originally Posted by gladius (Post 1387669)
maybe FL_FROZEN ?

It blocks everything, even velocity

Ryokin 01-07-2011 05:39

Re: Block player moving
 
so what should i use now ? . Ham_Player_Jump doesn't work very well


All times are GMT -4. The time now is 02:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.