Forum

> > CS2D > Scripts > No Equip
Forums overviewCS2D overview Scripts overviewLog in to reply

English No Equip

8 replies
To the start Previous 1 Next To the start

old No Equip

Obviously Exactly Myself
User Off Offline

Quote
Well, I think this script is very simple. Can anyone send me a script that:
When your a CT, you cannot pick up stealth suit and gold,coins,money.

So you won't be impatient, I provided the ID:
Stealth=84
Gold=68
Coins=66
Money=67

old Re: No Equip

Kel9290
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
addhook("collect","_c")
function _c(i,iid,type) -- open func
	if player(i,"team") == 1 then -- if CT then
		if type ~= 84 or type ~= 68 or type ~= 66 or type ~= 67 then -- if item has id 84 or 68 or 66 or 67 then
			return 1 -- don't pickup
		end -- okay
	else -- but else is spectator or T
		return 0 -- proceed normally
	end -- okay
end -- close func
must work. if something wrong try change "team" to 2

old Re: No Equip

MikuAuahDark
User Off Offline

Quote
@user Kel9290: that script will not work.
@user Obviously Exactly Myself:
Spoiler >

old Re: No Equip

Kel9290
User Off Offline

Quote
Your too, so stfu
UPD: now works fine
1
2
3
4
5
6
7
8
addhook("walkover","_c")
function _c(i,n,type)
	if player(i,"team") == 2 then
		if type == 84 or type == 68 or type == 66 or type == 67 then
			return 1
		end
	end
end

old Re: No Equip

DannyDeth
User Off Offline

Quote
@Kel & Idlers:
You are both as thick as pig skin!
1
2
3
4
5
6
7
8
9
ct_only = { 66,67,68,84 }
addhook("walkover","ct_only_f")
function ct_only_f(id,iid)
	for _,v in pairs(ct_only) do
		if(v == iid and player(id,"team") == 1) then
			return 1
		end
	end
end

EDIT: Ninja'd. Badly.

2: Or not?

old Re: No Equip

Kel9290
User Off Offline

Quote
@user DannyDeth: your script not work ;p (becoz IID, you must use TYPE and "team" is 2 for CT)
Spoiler >

old Re: No Equip

DannyDeth
User Off Offline

Quote
Read this, Kel: You are extremely wrong. Returning 1 in a walkover hook will make the person unable to pack up the item. So changing the team statement to 2 will make CTs unable to pick it up, numbnuts! Also, arguments are passed in a sequential fashion, so changing the name to 'type' won't do shit!

Once again, thick as pig skin.

old Re: No Equip

Kel9290
User Off Offline

Quote
@user DannyDeth:
ZomplantJelo has written
When your a CT, you cannot pick up stealth suit and gold,coins,money.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview