I decided to make a new Script.
BUT there's a error.
i need a script which will randomly choose player for a special rank.
each team should have 1 player with the special rank.
i made the script but the script dont works correctly.
IT works like this:
it will choose a player randomly among the all the players but not among the team.
But i need among the team,not among all the players.
Like this:
i need each team with 1 player having special rank.
example:
if there are 3 players in ct then 1 among the 3 should get the special rank.
and
if there are 3 players in t then 1 among the 3 should get the special rank.
basically:1 special rank user should be in t and 1 in ct.
the special rank user should equip laser and medic armor (this kind of script is already made,as i told u i made the lua but error)
Here is My Script which i made :
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
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
parse('restart 3') function getplayers() 	local s={} 	for id=1,32 do 		if player(id,"exists") and player(id,"team")~=0 and player(id,"health")>0 then 			table.insert(s,id) 		end 	end 	return s end function iArray(m,v) local array = {} for i = 1, m do array[i]=v end return array end function initArray(m) 	local array = {} 		for i = 1, m do 			array[i]=0 		end return array end function totable(t,match) local cmd = {} if not match then match = "[^%s]+" end for word in string.gmatch(t, match) do table.insert(cmd, word) end return cmd end join=initArray(32) king=0 addhook('startround','Ajm_Start') function Ajm_Start() local t=getplayers() king=math.random(1,#t) for id= king,king do parse('equip '..id..' 45') parse('setmaxhealth '..id..' 150') parse('setarmor '..id..' 83') end end