Forum

> > CS2D > General > Equip More Guns And Equipment
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Equip More Guns And Equipment

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Equip More Guns And Equipment

HoOtix
User Off Offline

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

alt Re: Equip More Guns And Equipment

Rainoth
Moderator Off Offline

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

alt Re: Equip More Guns And Equipment

HoOtix
User Off Offline

Zitieren
@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!
1× editiert, zuletzt 11.08.15 04:24:45

Admin/Mod Kommentar

Code tag has been added for two piece of codes. Next time use them when you post a code! /user GeoB99
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht