Forum

> > CS2D > Scripts > Strip knife if you have other melee ?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Strip knife if you have other melee ?

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Strip knife if you have other melee ?

phihung940
User Off Offline

Zitieren
Ok guys, I want to add a feature to the sample class script by Unreal Software, that if player has other melee weapon like Chainsaw, Wrench, claw... then knife will strip, but if you don't have other melee weapon, knife still there (obvious)

P/S: Only 1 melee allow in player inventory.

alt Re: Strip knife if you have other melee ?

UnkN
User Off Offline

Zitieren
Possible
Example:
1
2
3
4
5
6
7
addhook("select","abc")
function abc(id,type,mode)
if type== 50 then
parse("setweapon "..id.." 78")
parse("strip "..id.." 78")
end
end

alt Re: Strip knife if you have other melee ?

phihung940
User Off Offline

Zitieren
I just think again, is there anyway to remove knife permanent ? I've add this line:

parse("strip "..id.." 50")

after the class like this:

     -- HEAVY
     if (sample.classes.class[id]==3) then
          parse ("setmaxhealth "..id.." 200")
          parse ("speedmod "..id.." -3")
          parse("strip "..id.." 50")
          return "90,77,81";

but it doesnt works.

EDIT: It's work now.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht