Forum

> > CS2D > Scripts > How to disable dropping (excluding flags)
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to disable dropping (excluding flags)

5 replies
To the start Previous 1 Next To the start

old How to disable dropping (excluding flags)

Obviously Exactly Myself
User Off Offline

Quote
1
2
3
4
addhook("drop","sorry_for_spamming_ohaz")
function sorry_for_spamming_ohaz()
	return 1
end

I don't know much lua, but how can I not make players drop something but not the blue/red flag? (ID = 70 & 71) Because when he dies,he doesn't drop the flag, it just disappears!
edited 1×, last 07.01.12 01:24:18 pm

Admin/mod comment

title fixed. choose a better one next time!

old Re: How to disable dropping (excluding flags)

Alistaire
User Off Offline

Quote
Ah. The classes script. We meet again.

1
2
3
4
5
6
7
8
9
10
11
addhook("walkover","sample.classes.walkover")
	function sample.classes.walkover(id,iid,type)
    		if (type>=61 and type<=68) then
          		return 0
		elseif (type==55) then
			return 0
		elseif (type>=70 and type<=71) then
			return 0
     		end
	return 1
end

For the walkover; so they can pickup it.

Btw; you should just delete that part of the script. Not very useful at all.

old Re: How to disable dropping (excluding flags)

Alistaire
User Off Offline

Quote
Lol you clearly don't know anything about Lua. That doesn't work.

1
2
3
4
5
6
7
8
addhook("drop","drophook")
function drophook(id,type)
	if (type==70 or type==71) then
		return 0
	else
		return 1
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview