Forum

> > CS2D > Scripts > Check if dropped
Forums overviewCS2D overview Scripts overviewLog in to reply

English Check if dropped

2 replies
To the start Previous 1 Next To the start

old Check if dropped

Obviously Exactly Myself
User Off Offline

Quote
I have this script and it works but I don't know how to check if the player really dropped a weapon so the menu still appears even you drop nothing (Or in other words, while equipped with a knife).

1
2
3
4
5
6
7
8
9
addhook("drop","zj_trade")
function zj_trade(id,x,y)
	if player(id, "tilex") == 176 and player(id, "tiley") == 67 then
			zj_list6menu(id)
		return 0
	else
		return 2
	end
end

old Re: Check if dropped

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
addhook("drop","zj_trade")
function zj_trade(id,x,y)
	if player(id,"weapontype")~=50 then
		if player(id, "tilex") == 176 and player(id, "tiley") == 67 then
			zj_list6menu(id)
			return 0
		else
			return 2
		end
	end
end

old Re: Check if dropped

Obviously Exactly Myself
User Off Offline

Quote
user EngiN33R has written
1
2
3
4
5
6
7
8
9
10
11
addhook("drop","zj_trade")
function zj_trade(id,x,y)
	if player(id,"weapontype")~=50 then
		if player(id, "tilex") == 176 and player(id, "tiley") == 67 then
			zj_list6menu(id)
			return 0
		else
			return 2
		end
	end
end


It works.
Could you tell me how to give $50 whenever he killed an NPC.
edited 1×, last 13.01.12 01:02:16 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview