Forum

> > CS2D > Scripts > Drop hook [Doesn't work correctly]
Forums overviewCS2D overview Scripts overviewLog in to reply

English Drop hook [Doesn't work correctly]

5 replies
To the start Previous 1 Next To the start

old Drop hook [Doesn't work correctly]

Yates
Reviewer Off Offline

Quote
The drop addhook is being a dick. Seriously.

1
2
3
4
5
6
addhook("drop","tesst")
function tesst(id,iid)
	if iid==78 then
	return 1
	end
end
I cannot understand why this sometimes works, and sometimes doesn't. When I try to drop the claw, the Lua works fine (By not letting me). And sometimes it doesn't work and actually lets me drop it. Which isn't exactly a problem. But it's still not working properly.

Maybe it's my VERY HARD LUA CODE OF 6 LINES.
Or maybe it's a CS2D bug (<-- I choose this one).
edited 2×, last 28.11.11 06:57:59 pm

old Re: Drop hook [Doesn't work correctly]

Kel9290
User Off Offline

Quote
Try this?
1
2
3
4
5
6
7
8
addhook("drop","testdrop")
function testdrop(id,iid,type)
	if type==78 then
		return 1
	else
		return 0
	end
end
IDK, but iid doesn't works correct (maybe for me).
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview