Forum

> > CS2D > Scripts > Preventing Ts team to pick up certain items
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Preventing Ts team to pick up certain items

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Preventing Ts team to pick up certain items

GeoB99
Moderator Off Offline

Zitieren
Right, I was doing this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Items = {32, 33, 39, 21}

function unallow(id, iid, type)
	if player(id,"team") == 1 then
		for _,i in pairs(Items) do
			if itemtype == i then
				return 1
			else
				return 0
			end
		end
	end
end

addhook("walkover","unallow")
Pretty much basic stuff. What I want to do is to prevent Terrorists to pick up some items (mainly weapons) so I was thinking that cs2d lua hook walkover hook and returning value as 1 would do the job. Everything is fine, the Console doesn't print any lua error message with the exception that as a Terror I am still able to pick up those items...

I don't know what's the odd behind it. Probably either there is something wrong in 6 or 5 line which might causes this I guess but I am not sure though.

Any thoughts?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht