Forum

> > CS2D > Scripts > Drop hook [Doesn't work correctly]
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Drop hook [Doesn't work correctly]

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Drop hook [Doesn't work correctly]

Yates
Reviewer Off Offline

Zitieren
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).
2× editiert, zuletzt 28.11.11 18:57:59

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

Kel9290
User Off Offline

Zitieren
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).
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht