Forum

> > CS2D > General > Equip More Guns And Equipment
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Equip More Guns And Equipment

8 replies
To the start Previous 1 Next To the start

old Equip More Guns And Equipment

HoOtix
User Off Offline

Quote
Is there anyway that I can make a player hold more....

Primary Weapons (hold one of each weapon)
Secondary Weapons (hold one of each weapon)
Frags (hold more than one of each) - (not 100% needed)

---

If any of the listed requirments are actually possible in cs2d, May I ask... How? Thank you everyone.

-Why do I need this?-
-My half-life 2 mod is in progress, need the player to hold every one of each type of weapon-

Thank you, once again!

old Re: Equip More Guns And Equipment

Rainoth
Moderator Off Offline

Quote
Yes, you can have one of every type of item. You cant have multiple he grenades but it's possible to script a workaround for that. Please search the file archive, I'm sure you'll find what you're looking for.

old Re: Equip More Guns And Equipment

HoOtix
User Off Offline

Quote
@user Greenhawk:

1
2
3
4
5
6
7
8
function contains(table, element)
    for _, value in pairs(table) do
        if value == element then
            return true
        end
    end
    return false
end

1
2
3
4
5
6
7
8
9
addhook("walkover","moregun")
function moregun(id,iid,type)
     if not (contains(playerweapons(id),type)) then
          parse("equip "..id.." "..type)
          parse("setweapon "..id.." "..type)
          parse("removeitem "..iid)
          return 0
     end
end


---

Is this, actually possible to change to secondary "version" ?

RE: Nvm LOL this works!
edited 1×, last 11.08.15 04:24:45 am

Admin/mod comment

Code tag has been added for two piece of codes. Next time use them when you post a code! /user GeoB99
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview