Forum

> > CS2D > Scripts > anti button hack script
Forums overviewCS2D overview Scripts overviewLog in to reply

English anti button hack script

10 replies
To the start Previous 1 Next To the start

old anti button hack script

dmessn28
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function echo(id,...)
	s = ""
	for i,v in ipairs(arg) do
		s = s..tostring(v).." "
	end
	
	msg2(id,s)
end

addhook("usebutton","h_usebutton")
function h_usebutton(id,x,y)
	--echo(id,x*32,y*32)
	dir = entity(x,y,"int1")
	tg = entity(x,y,"trigger")	
	
	local px,py = x*32,y*32
	local minx,maxx,miny,maxy = px,px+32,py,py+32
	
	local playerx,playery = player(id,"x"),player(id,"y")
	
	if playerx < maxx and playerx > minx and playery < maxy and playery > miny then
		--echo(id,"valid trigger")
	else
		echo(id,"invalid trigger, hack detected!")
		parse("trigger "..tg) -- trigger again to undo
	end
end

This is for server hosters who were bothered by people that use the button hack.

Problem was that a button could be activated from large distance ( 10x10 tiles or sth) when using packet editing software. This script prevents that buttons can be used from large distance. It was very annoying in rpg and prison maps.

old Re: anti button hack script

Yates
Reviewer Off Offline

Quote
It works. And not that I have the hack, but I can explain how I know.
On cs2d, you can trigger a button 2 tiles away. Now, with this you can't. You HAVE to stand on that tile x y, which I find is better.

And that's how I know =3

old Re: anti button hack script

Apache uwu
User Off Offline

Quote
Yeah for prison maps they completely screw you over when they door kill you from a tile way.

I like this, thanks for posting.

Doesn't cs2d check automatically if you're allowed to press that button?

old Re: anti button hack script

dmessn28
User Off Offline

Quote
user Apache uwu has written
Doesn't cs2d check automatically if you're allowed to press that button?


No, that's the whole problem of it. Current hacks abuse clientside teleportation to abuse the button/door hack.
You can press the button in a range of 5x5 tiles.
Can be used in prison maps, city life, deathrun, happy town etc.

old Re: anti button hack script

MeyeM
BANNED Off Offline

Quote
yeah
really thank you
its great work you do
yates use it in his server
but its so great idea
now uprate6 + Dr.Trojan can't use it in all servers ( if the servers use this script )

old Nice

dexiraz
User Off Offline

Quote
Cool Script i love it Thank you !! √
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview