Forum

> > CS2D > Scripts > Infinite SECONDARY ammo
Forums overviewCS2D overview Scripts overviewLog in to reply

English Infinite SECONDARY ammo

3 replies
To the start Previous 1 Next To the start

old Infinite SECONDARY ammo

LMB_10000
User Off Offline

Quote
Um... Hello. I've just wanted to ask you about one LUA script. I need put infinite ammo ONLY for SECONDARY weapons (USP, Glock, Desert Eagle etc.) How can I do this?

old Re: Infinite SECONDARY ammo

Apache uwu
User Off Offline

Quote
Try this:

infinite clip (no reload):

1
2
3
4
5
6
7
addhook("attack", "_attack")

function _attack(id)
    if itemtype(player(id, "weapontype"), "slot") == 2 then
        parse("equip "..id.." "..player(id, "weapontype"))
    end
end

infinite clips (reload):

1
2
3
4
5
6
7
addhook("reload", "_reload")

function _reload(id, mode)
    if itemtype(player(id, "weapontype"), "slot") == 2 and mode == 2 then
        parse("equip "..id.." "..player(id, "weapontype"))
    end
end
edited 2×, last 25.08.13 01:01:06 am

old Re: Infinite SECONDARY ammo

EP
User Off Offline

Quote
@user Apache uwu:

1
2
3
4
5
6
7
addhook("reload","_reload")
function _reload(id,mode)
	local wpn = player(id,"weapontype")
	if mode == 2 and (wpn >= 1 and wpn <= 6) then
		parse("equip "..id.." "..wpn)
	end
end
i hope this works, it equips the same weapon (only pistols) when you finish reloading it
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview