Forum

> > CS2D > Scripts > Strip knife if you have other melee ?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Strip knife if you have other melee ?

7 replies
To the start Previous 1 Next To the start

old Strip knife if you have other melee ?

phihung940
User Off Offline

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

old Re: Strip knife if you have other melee ?

UnkN
User Off Offline

Quote
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

old Re: Strip knife if you have other melee ?

phihung940
User Off Offline

Quote
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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview