Forum

> > CS2D > Scripts > "Weapon without ammo" script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch "Weapon without ammo" script

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt "Weapon without ammo" script

muxarus
User Off Offline

Zitieren
Hi us unrealSoftWare! Today i got some idea and i dont know to make some script... okay, so, i want to make some script that making weapon without ammo when i get it by equip command P.S. I think that my idea is impossible to make.

alt Re: "Weapon without ammo" script

Ajmin
User Off Offline

Zitieren
What u actually need?
While equip u need the weapon to be 0/0 ammo?

Edit:
1
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!
2× editiert, zuletzt 05.02.15 12:39:05

alt Re: "Weapon without ammo" script

Pagyra
User Off Offline

Zitieren
1
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

alt Re: "Weapon without ammo" script

muxarus
User Off Offline

Zitieren
user Ajmin hat geschrieben
What u actually need?
While equip u need the weapon to be 0/0 ammo?

Edit:
1
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht