Sign in to follow this  

ElevatorFix (Disable elevators)

Recommended Posts

Hi I am currently running the following code

ElevatorFix() {
	self endon("disconnect");
	self endon("death");
	self endon("joined_spectators");
	while(1) {
		oldorigin = self.origin;
		wait .05;
		if(oldorigin[0] == self.origin[0] && oldorigin[1] == self.origin[1] && !self IsOnLadder() && oldorigin[2] < self.origin[2]) {
			wait .1;
			if(oldorigin[0] == self.origin[0] && oldorigin[1] == self.origin[1] && !self IsOnLadder() && (oldorigin[2] + getDvarInt("jump_height") < self.origin[2]) && !self IsOnGround()) {
				for(i=0;i<340;i++) {
					pos = BulletTrace( self.origin+((50*cos(i+10)),(50*sin(i+10)),0), self.origin+((50*cos(i+10)),(50*sin(i+10)),-200), 0, self)[ "position" ];
					if(BulletTracePassed(self.origin+((50*cos(i)),(50*sin(i)),0),self.origin+((50*cos(i+20)),(50*sin(i+20)),0),0,self) && pos[2] < oldorigin[2]) {
 						self setOrigin(pos);

However players are able to bypass this by lowering their fps to 10 or 20, does anyone have an improved version of this that would stop they getting around it? Would be much appreciated, just want my server to be a normal server without guys flying on top of the map and killing people from up there.


Meny thanks


Share this post

Link to post
Share on other sites

Well, since elevator technique is like moving straght by Z coord up and it as fast as much you have fps so to catch this kind of players, you can test last few positions if its changes only by increasing z coord.

So you have 20 frames per second on server and its only one second for a server maybe 20 last locations will be enough but I doubt it.

You can limit user fps to be greater than 50. Who has < 60 in cod4 nowadays?

Also, you can change "setOrigin" punishment to a little damageless push so player will fall whereever he is. But thats can be difficult to achieve with single push - you can do four in all directions and one of four will be enough to drop player. In my opinion is kinda funny. Also you can print something on players screens so other players will know about guy.

Easiest punishment is suicide :)

  • Like 1

Share this post

Link to post
Share on other sites

Easier version that actually works 100% of the time.


Clone the old (2019) version of cod4x (newer requires version 18 of the client which seems unavailable)


On linux:

git clone

cd CoD4x_Server

git checkout 14d0a7cc52 (this seems to be the last commit before they changed the required client version to 18)

Now go the directory with a file explorer, go to /src/asmsource/_bg_pmove.asm

Go to line 488 and replace     jz PM_GroundTrace_20 with     jmp PM_GroundTrace_20

make the server files.


Enjoy a game where elevating players are stuck. They can get unstuck by setting cg_nopredict 1 for a short while when they exit the elevator spot.


Most of the research required for this was done by xoxor4d when he released his bouncepatch ( while most of the coding/research in that area was done by Ridgepig. All credits go to them.

  • Like 2

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this