Raised This Month: $ Target: $400
 0% 

Block Player Movement


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-07-2009 , 04:27   Block Player Movement
Reply With Quote #1

I would like to ask you if you can show me a way to block a player's movement like the way it is in the freeze time plus no jump. The player should not be able to move, just to rotate over its body.
joaquimandrade is offline
zwfgdlc
Senior Member
Join Date: May 2006
Old 01-07-2009 , 04:57   Re: Block Player Movement
Reply With Quote #2

PHP Code:
#include <fakemeta>

stock fm_set_user_frozen(id)
{
    
set_pev(id,pev_flags,pev(id,pev_flags)&FL_FROZEN?pev(id,pev_flags)&~FL_FROZEN:pev(id,pev_flags)|FL_FROZEN);

zwfgdlc is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-07-2009 , 12:10   Re: Block Player Movement
Reply With Quote #3

Code:
#include <fakemeta> // if frozen is 1, freeze client // if frozen is 0, unfreeze client stock fm_set_user_frozen(client, frozen) {     if( !is_user_alive(client) ) return 0;         new flags = pev(client, pev_flags);     if( frozen && !(flags & FL_FROZEN) )     {         set_pev(client, pev_flags, (flags | FL_FROZEN));     }     else if( !frozen && (flags & FL_FROZEN) )     {         set_pev(client, pev_flags, (flags & ~FL_FROZEN));     }         return 1; }

Or, you can set player's maxspeed to -1.0, gravity to 0.000001, and velocity to {0.0, 0.0, 0.0}
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-07-2009 , 12:49   Re: Block Player Movement
Reply With Quote #4

Thank you both very much. One more question: where you can learn about fakemeta to do thing like these?
joaquimandrade is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-07-2009 , 12:58   Re: Block Player Movement
Reply With Quote #5

Possible way would be read fakemeta.inc? Also fakemeta.const and fakemeta_util.inc would be nice to check... They exist in amxmodx/Scripting/Include if you have installed amxmodx (Think you probably have)
SnoW is offline
Send a message via MSN to SnoW
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-07-2009 , 12:58   Re: Block Player Movement
Reply With Quote #6

Your code adds a thing that i wouldn't want to happen. A player with an AWP cannot do +attack2. He can't use the scope.
joaquimandrade is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-07-2009 , 13:01   Re: Block Player Movement
Reply With Quote #7

If you want that player is only move freezed:
Quote:
Originally Posted by Exolent[jNr] View Post
Or, you can set player's maxspeed to -1.0, gravity to 0.000001, and velocity to {0.0, 0.0, 0.0}
SnoW is offline
Send a message via MSN to SnoW
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-07-2009 , 13:05   Re: Block Player Movement
Reply With Quote #8

Hey,

client_cmd <<< unbindall

:-D was just jking :-D

Bestidea : zwfgdlc :-D
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-07-2009 , 13:13   Re: Block Player Movement
Reply With Quote #9

Quote:
Originally Posted by SnoW View Post
If you want that player is only move freezed:
"Or, you can set player's maxspeed to -1.0, gravity to 0.000001, and velocity to {0.0, 0.0, 0.0}"

None of these three are blocking the players movement. The only that happens to change anything is gravity but it is just sticking the player to the ceil after jumping.
joaquimandrade is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-07-2009 , 13:29   Re: Block Player Movement
Reply With Quote #10

You are wrong. Setting user speed that low makes him not able to walk/run/swim, gravity -> he can't jump and velocity stops him if he were in speed already. That blocks the players movement todally said you or what.
Edit: Btw, Did you mean that you can't zoom when frozen?
SnoW is offline
Send a message via MSN to SnoW
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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