Forum
CS2D Scripts "Weapon without ammo" script"Weapon without ammo" script
6 replies 1
While equip u need the weapon to be 0/0 ammo?
Edit:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("say","s") function s(id,txt) if txt:lower():sub(1,6) =="!equip" then wpn = txt:sub(8,10) parse("equip "..id.." "..wpn.."") parse("setweapon "..id.." "..wpn.."") parse("setammo "..id.." "..wpn.." 0") end end
Type "!equip (wpn id)" to equip weapons!
edited 2×, last 05.02.15 12:39:05 pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("drop","weapondrop") function weapondrop(id,iid,type,ain,a) 	if item(id,"ammo") >0 then item(id,"ammo")=0 	end end addhook("startround","weaponammonil") function weaponammonil() local itemlist=item(0,"table") for _,id in pairs(itemlist) do 	if item(id,"dropped") then item(id,"ammo")=0 	end end
Not tested, errors may occur in the code
I think u didnt understand him.
Ajmin has written
What u actually need?
While equip u need the weapon to be 0/0 ammo?
Edit:
Type "!equip (wpn id)" to equip weapons!
While equip u need the weapon to be 0/0 ammo?
Edit:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("say","s") function s(id,txt) if txt:lower():sub(1,6) =="!equip" then wpn = txt:sub(8,10) parse("equip "..id.." "..wpn.."") parse("setweapon "..id.." "..wpn.."") parse("setammo "..id.." "..wpn.." 0") end end
Type "!equip (wpn id)" to equip weapons!
thank you so much! you helped me a lot
1