murilogc has written
i want one script of classes ,
classes
Shop Owner (0/5)
Medic , if txt !gomedic , go to the medic (0/1)
Owner Hotel if txt !gohotel , go to the hotel (0/1)
and text !info show your profession
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
rp={}
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
myclass=initArray(32)
shopowners=initArray(1)
medics=initArray(1)
hotelowners=initArray(1)
addhook("say","class_sel")
function class_sel(id,txt)
	if(txt=="!goshop")then
		if(myclass[id]==0)then
			if(shopowners[1]<5)then
				shopowners[1]=shopowners[1]+1
				myclass[id]=1
				msg2(id,"©255255255Congratulations you are a shop owner now!")
				msg("©255255000"..(player(id,"name")).." is a shop-owner now!")
				msg("©000255255Shop-Owners: "..shopowners[1].."/5")
				msg("©000255255Hotel-Owners: "..hotelowners[1].."/1")
				msg("©000255255Medics: "..medics[1].."/1")
				return 1
			else
				msg2(id,"©255255255There are already "..shopowners[1].." Shop Owners!")
				return 1
			end
		else
			msg2(id,"©255255255You are already a in a class!")
			return 1
		end
	end
	if(txt=="!gomedic")then
		if(myclass[id]==0)then
			if(medics[1]<1)then
				medics[1]=medics[1]+1
				myclass[id]=2
				msg2(id,"©255255255Congratulations you are a Medic now!")
				msg("©255255000"..(player(id,"name")).." is a medic now!")
				msg("©000255255Shop-Owners: "..shopowners[1].."/5")
				msg("©000255255Hotel-Owners: "..hotelowners[1].."/1")
				msg("©000255255Medics: "..medics[1].."/1")
				return 1
			else
				msg2(id,"©255255255There are already "..medics[1].." Medics!")
				return 1
			end
		else
			msg2(id,"©255255255You are already a in a class!")
			return 1
		end
	end
	if(txt=="!gohotel")then
		if(myclass[id]==0)then
			if(hotelowners[1]<1)then
				hotelowners[1]=hotelowners[1]+1
				myclass[id]=3
				msg2(id,"©255255255Congratulations you are a hotel owner now!")
				msg("©255255000"..(player(id,"name")).." is a hotel-owner now!")
				msg("©000255255Shop-Owners: "..shopowners[1].."/5")
				msg("©000255255Hotel-Owners: "..hotelowners[1].."/1")
				msg("©000255255Medics: "..medics[1].."/1")
				return 1
			else
				msg2(id,"©255255255There are already "..hotelowners[1].." hotel owners!")
				return 1
			end
		else
			msg2(id,"©255255255You are already a in a class!")
			return 1
		end
	end
	if(txt=="!info")then
		if(myclass[id]==1)then
			msg2(id,"©255255255You are a shop owner!")
			return 1
		elseif(myclass[id]==2)then
			msg2(id,"©255255255You are a Medic!")
			return 1
		elseif(myclass[id]==3)then
			msg2(id,"©255255255Yoau are a hotel owner!")
			return 1
		else
			msg2(id,"©255255255You are a player!")
			return 1
		end
	end
	if(txt=="!resetclass")then
		if(myclass[id]==0)then
			msg2(id,"©255255255You aren't in a class")
			return 1
		elseif(myclass[id]==1)then
			msg2(id,"©255255255Your class is reseted")
			msg("©255255000There is a shop-owner-class avaible again!")
			msg("©000255255Shop-Owners: "..(shopowners[1]-1).."/5")
			msg("©000255255Hotel-Owners: "..hotelowners[1].."/1")
			msg("©000255255Medics: "..medics[1].."/1")
			myclass[id]=0
			shopowners[1]=shopowners[1]-1
			return 1
		elseif(myclass[id]==2)then
			msg2(id,"©255255255Your class is reseted")
			msg("©255255000There is a medic-class avaible again!")
			msg("©000255255Shop-Owners: "..shopowners[1].."/5")
			msg("©000255255Hotel-Owners: "..hotelowners[1].."/1")
			msg("©000255255Medics: "..(medics[1]-1).."/1")
			myclass[id]=0
			return 1
		elseif(myclass[id]==3)then
			msg2(id,"©255255255Your class is reseted")
			msg("©255255000There is a hotel-owner-class avaible again!")
			msg("©000255255Shop-Owners: "..shopowners[1].."/5")
			msg("©000255255Hotel-Owners: "..(hotelowners[1]-1).."/1")
			msg("©000255255Medics: "..medics[1].."/1")
			myclass[id]=0
			return 1
		end
	end
end