English Classes for CTs also activate for Ts

12 replies
Goto Page
To the start Previous 1 Next To the start
Up
Elias51
User
Offline Off
Hello, I was doing two Scripts, are classes for CTs and Ts, the problem is that when I enter Ts they appear to me the Scripts of CT. There something to fix it?

Sorry for my English
I definitely have that learn to speak English.
12.01.12 04:11:31 am
Up
MikuAuahDark
User
Offline Off
can you show me the script?
Hello? Are you there, Tae Hanazono?
12.01.12 08:08:54 am
Up
EngiN33R
Moderator
Offline Off
Maybe you just confused the mumbers of the teams - T is 1, CT is 2.
I code, therefore I exist. | Visit my blog for Lua tips and other interesting info
12.01.12 07:06:07 pm
Up
Elias51
User
Offline Off
This script is the only CT. I have a problem with CT. (classes themed Aliens )

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
if sample==nil then sample={} end
sample.classes={}
-----------------------
-- INITIAL SETUP     --
-----------------------
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,Marine|,Sintetic|,Sniper|,Flamethrower|,Smartgunner|,Medic|")     
end

-----------------------
-- TEAM -> CLASS     --
-----------------------
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<=6) 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)
     -- Marine
     if (sample.classes.class[id]<=1) then
          parse ("setmaxhealth "..id.." 100")
          parse ("setarmor "..id.." 100")
          return "32,6,51";
     end
     -- Sintetic
     if (sample.classes.class[id]==2) then
          parse ("setmaxhealth "..id.." 150")
          parse ("setarmor "..id.." 120")
          return "11,4,74";
     end
     -- Sniper
     if (sample.classes.class[id]==3) then
          parse ("setmaxhealth "..id.." 90")
          parse ("setarmor "..id.." 110")
          return "37,6,52";
     end
     -- Flamethrower
     if (sample.classes.class[id]==4) then
          parse ("setmaxhealth "..id.." 120")
          parse ("setarmor "..id.." 120")
          return "46,73,3";
     end
     -- Smartgunner
     if (sample.classes.class[id]==5) then
          parse ("setmaxhealth "..id.." 100")
          parse ("setarmor "..id.." 100")
          return "40,3,53";
     end
     -- Medic
     if (sample.classes.class[id]==6) then
          parse ("setmaxhealth "..id.." 75")
          parse ("setarmor "..id.." 100")
          return "22,54";
     end
end


-----------------------
-- NO BUYING         --
-----------------------
addhook("buy","sample.classes.buy")
function sample.classes.buy()
     return 1
end


-----------------------
-- NO COLLECTING     --
-----------------------
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


-----------------------
-- NO DROPPING       --
-----------------------
addhook("drop","sample.classes.drop")
function sample.classes.drop()
     return 1
end


-----------------------
-- NO DEAD DROPPING  --
-----------------------
addhook("die","sample.classes.die")
function sample.classes.die()
     return 1
end
I definitely have that learn to speak English.
13.01.12 02:43:29 am
Up
MikuAuahDark
User
Offline Off
let's see
unested >
that script only allow ct to select class
Hello? Are you there, Tae Hanazono?
13.01.12 03:08:09 am
Up
Elias51
User
Offline Off
Thanks, but now there is another problem, the zombies mode, zombie are armed. only happens when the script is set, what's the problem?
I definitely have that learn to speak English.
13.01.12 03:18:41 am
Up
MikuAuahDark
User
Offline Off
waw, fixed script!
tested >
Hello? Are you there, Tae Hanazono?
13.01.12 08:30:19 pm
Up
Elias51
User
Offline Off
now I have a little problem, all goes well, the zombies have no weapons, but when I enter the zombie side and choose a class, ej:the 2, appears armed as class 2 human

This is Script (the script was not made by me)
Spoiler >
I definitely have that learn to speak English.
15.01.12 02:48:25 am
Up
MikuAuahDark
User
Offline Off
untested >
i just combine the ct classes and t classes
Hello? Are you there, Tae Hanazono?
15.01.12 04:06:49 am
Up
Elias51
User
Offline Off
i'm Sorry, does not work
I definitely have that learn to speak English.
15.01.12 05:57:23 am
Up
Bowlinghead
User
Offline Off
untested >
You have to configurate the menu hook too!

Does it work now?
Share time limited free games here
15.01.12 06:21:03 am
Up
MikuAuahDark
User
Offline Off
user Bowlinghead has written:
You have to configurate the menu hook too!

yes, i forgot that
@user Elias51: try user Bowlinghead script
Hello? Are you there, Tae Hanazono?
15.01.12 09:10:22 pm
Up
Elias51
User
Offline Off
menu hook?
edited 1×, last 17.01.12 12:42:31 am
I definitely have that learn to speak English.
To the start Previous 1 Next To the start