Forum

> > CS2D > Scripts > Script Request
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script Request

4 replies
To the start Previous 1 Next To the start

old Script Request

KagamineLen
User Off Offline

Quote
guys is there script that you can take a droped weapon so youll be having 2 weapons

like a rpg and i saw a droped laser so i go over it and got the laser now i have an rpg and a laser
edited 1×, last 16.03.13 05:11:33 pm

old Re: Script Request

EngiN33R
Moderator Off Offline

Quote
A very simple script, but it does what you want.
1
2
3
4
5
addhook("walkover","weapons")
function weapons(id,iid,type)
	parse("removeitem "..iid)
	parse("equip "..id.." "..type)
end

old Re: Script Request

KagamineLen
User Off Offline

Quote
it makes error with defuse kits, flags and etc. also is there a check if the player already has that weapon?

old Re: Script Request

omg
User Off Offline

Quote
this is what i have in my scripts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("walkover","pillage")
function pillage(id,item,itemtype)
	if itemtype>78 and itemtype<85 then
		parse("removeitem "..item)
		parse("setarmor "..id.." "..itemtype+122)
		return 1
	elseif (itemtype>56 and itemtype<61) or itemtype==70 or itemtype==71 then
		return 0
	else
		parse("removeitem "..item)
		parse("equip "..id.." "..itemtype)
		return 1
	end
end
why would u check to see if the player already had the weapon? it just equips the new weapon over their old one

old Re: Script Request

KagamineLen
User Off Offline

Quote
it adds their ammo, and i need the checking if player already has weapons imma gonna use that on ma scripts
edited 1×, last 19.03.13 03:54:34 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview