English Class

4 replies
Goto Page
To the start Previous 1 Next To the start
29.11.13 01:36:04 pm
Up
Remulux
User
Offline Off
Hi i use class script but how to delete knife on class: Heavy,Engineer,Sniper? And doctor and spy don't get armor.
Help please.
Sorry for my english.



Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
if sample==nil then sample={} end
sample.classes={}

function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
sample.classes.class=initArray(32)
function sample.classes.classmenu(id)
     menu(id,"Select your Class,Scout|Attack/Offensive,Soldier|Offensive,Pyro|Offensive,Demoman|Defensive,Heavy|Defensive,Engineer|Defensive,Medic|Support,Sniper|Support,Spy|Support")
end


-----------------------
-- Classes           --
-----------------------
addhook("team","sample.classes.team")
function sample.classes.team(id,team)
     if (team>0) then
          sample.classes.classmenu(id)
     end
end


-----------------------
-- SERVERACTION      --
-----------------------
addhook("serveraction","sample.classes.serveraction")
function sample.classes.serveraction(id)
     sample.classes.classmenu(id)
end


-----------------------
-- CLASS SELECTION   --
-----------------------
addhook("menu","sample.classes.menu")
function sample.classes.menu(id,menu,sel)
     if (menu=="Select your Class") then
          if (sel>=0 and sel<=9) then
               sample.classes.class[id]=sel
               if (player(id,"health")>0) then
                    parse("killplayer "..id)
               end
          end
     end
end


-----------------------
-- SPAWN             --
-----------------------
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
     -- Scout
     if (sample.classes.class[id]==1) then
          parse ("setmaxhealth "..id.." 125")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 13")
          return "50,6,11";
     end
     -- Soldier
     if (sample.classes.class[id]==2) then
          parse ("setmaxhealth "..id.." 200")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 8")
          return "50,11,48";
     end
     -- Pyro
     if (sample.classes.class[id]==3) then
          parse ("setmaxhealth "..id.." 175")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 10")
          return "50,11,46";
     end
     -- Demoman
     if (sample.classes.class[id]==4) then
          parse ("setmaxhealth "..id.." 175")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 9")
          return "50,51,49";
     end
     -- Heavy
     if (sample.classes.class[id]==5) then
          parse ("setmaxhealth "..id.." 300")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 7")
          return "78,10,40";
     end
     -- Engineer
     if (sample.classes.class[id]==6) then
          parse ("setmaxhealth "..id.." 125")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 10")
          return "74,6,11";
     end
      -- Medic
     if (sample.classes.class[id]==7) then
          parse ("setmaxhealth "..id.." 150")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 10")
          return "50,85,21,82";
     end
      -- Sniper
     if (sample.classes.class[id]==8) then
          parse ("setmaxhealth "..id.." 125")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 10")
          return "69,3,35";
     end
      -- Spy
     if (sample.classes.class[id]==9) then
          parse ("setmaxhealth "..id.." 125")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 10")
          return "50,4,84";
     end
end

--------------------------
-- You Can't buy        --
--------------------------
addhook("buy","sample.classes.buy")
function sample.classes.buy()
     return 1
end


-----------------------------
-- You can't catch stuff   --
-----------------------------
addhook("walkover","sample.classes.walkover")
function sample.classes.walkover(id,iid,type)
     if (type>=61 and type<=68) then
          return 0
     end
     return 1
end


-------------------------
-- You Can't Drop      --
-------------------------
addhook("drop","sample.classes.drop")
function sample.classes.drop()
     return 1
end


-----------------------------
-- DEAD Don't drop things  --
-----------------------------
addhook("die","sample.classes.die")
function sample.classes.die()
     return 1
end
29.11.13 02:51:43 pm
Up
Rainoth
Moderator
Offline Off
For the knife you'll reffer to that other thread you made

Now for Doc and Spy, you should change
Code:
1
return ""


Armor IDs:
L Arm - 79
Arm - 80
Heavy Arm - 81
Medic Arm - 82
Super Arm - 83
Stealth Suit - 84

Just remove the IDs from returns and you'll have your armor removed.
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
29.11.13 03:39:47 pm
Up
Remulux
User
Offline Off
Yes, but not for that matter, my English is bad. Medic and spy doesn't get the armor though should get.
29.11.13 05:20:18 pm
Up
Rainoth
Moderator
Offline Off
That's because you set a player's armor to 0 everywhere. Sorry I misunderstood about the armor. >


P.S. Max health in this game is 250. You won't be able to overheal either.
If you want to play Team Fortress 2 in a 2D game, you should check out file cs2d EngiN33R's TF2 mod (BETA 3.3.1) (87)
MAL • DeviantArt • For Wallpaper Engine users • Check YT for playlists... •
29.11.13 05:39:07 pm
Up
Remulux
User
Offline Off
ok thx for help
To the start Previous 1 Next To the start