English Classes Script doesnt work

8 replies
Goto Page
To the start Previous 1 Next To the start
24.08.13 05:43:51 pm
Up
alex72super
User
Offline Off
hello i made a medieval classes script but it doesnt work
It's my first script and i decided to make a classes script
here:
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
-- Medieval Classes Script by Alex72super--
-- U.S.G.N: 26737                        --

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 Medieval Class,Swordsman|Armor,Assassin|Stealth+Machete,SuicideMan|Chainsaw,Ambusher|Mines+Smoke,Knight|Shield+L.Armor")
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<=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) end
     -- Swordsman
     if ("sample.classes.class[id]==1") then
          parse ("setmaxhealth "..id.." 150")
          parse ("setarmor "..id.." 202")
     end
     -- Assassin
     if ("sample.classes.class[id]==2") then
          parse ("setmaxhealth "..id.." 100")
          parse ("setarmor "..id.." 206")
          parse ("speedmod "..id.." 5")
          return "84,69";
     end
     -- SuicideMan
     if ("sample.classes.class[id]==3") then
          parse ("setmaxhealth "..id.." 100")
          return "85";
     end
     -- Ambusher
     if ("sample.classes.class[id]==4") then
          parse ("setmaxhealth "..id.." 125")
          parse ("setarmor "..id.." 75")
          return "77,53";
     end
     -- Knight
     if ("sample.classes.class[id]==5") then
          parse ("setmaxhealth "..id.." 75")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 15")
          return "41,79";
     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
24.08.13 06:17:33 pm
Up
Alexsandro
User
Offline Off
Code:
1
2
3
4
5
--------------------------------------------------
-- Player Classes Script by Unreal Software     --
-- 28.02.2009 - www.UnrealSoftware.de           --
-- Adds Player Classes to your server           --
--------------------------------------------------


Correct the rows 1 and 2
IMG:http://img130.imageshack.us/img130/8425/2510.png
24.08.13 06:30:21 pm
Up
Gajos
BANNED
Offline Off
DELETED
edited 1×, last 24.08.13 10:05:55 pm
Banned for Hacking/Cheating in CS2D /DC
24.08.13 08:06:16 pm
Up
alex72super
User
Offline Off
Polish coder it still doesnt work

everyone starts with stealth and machete no matter what class you chose
24.08.13 10:22:20 pm
Up
Gajos
BANNED
Offline Off
now should to work
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
-- Medieval Classes Script by Alex72super--
-- U.S.G.N: 26737                        --

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 Medieval Class,Swordsman|Armor,Assassin|Stealth+Machete,SuicideMan|Chainsaw,Ambusher|Mines+Smoke,Knight|Shield+L.Armor")
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 Medieval 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) end
     -- Swordsman
     if (sample.classes.class[id]==1) then
          parse ("setmaxhealth "..id.." 150")
          parse ("setarmor "..id.." 202")
     end
     -- Assassin
     if (sample.classes.class[id]==2) then
          parse ("setmaxhealth "..id.." 100")
          parse ("setarmor "..id.." 206")
          parse ("speedmod "..id.." 5")
          return "84,69";
     end
     -- SuicideMan
     if (sample.classes.class[id]==3) then
          parse ("setmaxhealth "..id.." 100")
          return "85";
     end
     -- Ambusher
     if (sample.classes.class[id]==4) then
          parse ("setmaxhealth "..id.." 125")
          parse ("setarmor "..id.." 75")
          return "77,53";
     end
     -- Knight
     if (sample.classes.class[id]==5) then
          parse ("setmaxhealth "..id.." 75")
          parse ("setarmor "..id.." 0")
          parse ("speedmod "..id.." 15")
          return "41,79";
     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
Banned for Hacking/Cheating in CS2D /DC
25.08.13 11:17:16 am
Up
vanyok2011
User
Offline Off
it is one of samples. -.-
25.08.13 12:03:57 pm
Up
alex72super
User
Offline Off
im sorry but it still doesnt work

this time the classes doesnt work
25.08.13 02:54:09 pm
Up
vanyok2011
User
Offline Off
Code:
1
function sample.classes.spawn(id) end

you closed function lol
25.08.13 06:15:22 pm
Up
alex72super
User
Offline Off
Thank you its solved now
To the start Previous 1 Next To the start