Again... the problem and request.
1. I created a simple class script. The problem (request maybe) is how to make bots choose random class.
This is the script. Open the spoiler for code ( if this useful ).
Mehr
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
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
addhook("serveraction","p_action") addhook("serveraction","p_action2") addhook("menu","p_menu") addhook("buy","p_buy") addhook("drop","id_drop") addhook("die","id_die") addhook("spawn","m_spawn") addhook("collect","id_collect") function endround() 	if time==0 then 		parse("sethealth "..id.." 0") 	end end function id_collect(id,iid,type) 	if (type>=61 and type<=68) then 		return 0 	end 	return 1 end function id_die() 	return 1 end function id_drop() 	return 1 end function p_buy() 	return 1 end function m_spawn(id) 	parse("setarmor "..id.." 1") 	parse("strip "..id) 	parse("setmaxhealth "..id.." 200") 	parse("setmoney "..id.." 500") end function menu_act1(id) 	menu(id,"Select Weapon Class,Assault,Sniper,Support,Infantry,(Tactical),(),(),(),()") end function menu_act2(id) 	menu(id,"Supply Shop,Ammo|$250") end function p_action(id,action) 	if (player(id,"armor")==1) then 		if action==1 then 			menu_act1(id) 		end 	end end function p_action2(id,action) 	if action==2 then 		menu_act2(id) 	end end function p_menu(id,title,button) 	if title=="Select Weapon Class" then 		if button==1 then -- Assault 			parse("equip "..id.." 91") -- FNF2000 			parse("equip "..id.." 5") -- Elite 			parse("equip "..id.." 51") 			parse("equip "..id.." 80") 		elseif button==2 then -- Sniper 			parse("equip "..id.." 35") -- AWP 			parse("equip "..id.." 1") -- USP 			parse("equip "..id.." 51") -- HE 			parse("equip "..id.." 84") -- InvSuit 			parse("equip "..id.." 79") 		elseif button==3 then --Support 			parse("equip "..id.." 22") -- P90 			parse("equip "..id.." 41") -- Shield 			parse("equip "..id.." 6") -- 57 			parse("equip "..id.." 52") 			parse("equip "..id.." 79") -- LightSuit 		elseif button==4 then -- Infantry 			parse("equip "..id.." 47") -- RPG 			parse("equip "..id.." 5") -- Elite 			parse("equip "..id.." 76") -- AiStrike 			parse("equip "..id.." 79") 		elseif button==5 then -- Pyro 			parse("equip "..id.." 46") -- Flamer 			parse("equip "..id.." 2") -- GLock 			parse("equip "..id.." 73") -- Molotov 			parse("equip "..id.." 80") 		elseif button==6 then -- Tactical Force 			parse("equip "..id.." 33") -- AUG 			parse("equip "..id.." 1") -- USP 			parse("equip "..id.." 53") -- Smoker 			parse("equip "..id.." 79") 			parse("speedmod "..id.." 5") 		end 	end 	if title=="Supply Shop" then 		if button==1 then 			parse("equip "..id.." 61") 			parse("equip "..id.." 62") 			parse("setmoney "..id.." "..(player(id, "money") - 250)) 		end	 	end end parse("mp_kevlar 0.0") parse("mp_damagefactor 1.0") parse("mp_wpndmg FNF2000 24") parse("mp_wpndmg ELITE 20") parse("mp_wpndmg AWP 140") parse("mp_wpndmg_z1 AWP 170") parse("mp_wpndmg_z2 AWP 205") parse("mp_wpndmg P90 22") parse("mp_wpndmg USP 16") parse("mp_wpndmg FIVE-SEVEN 18") parse("mp_wpndmg HE 190") parse("mp_wpndmg knife 100") parse("mp_wpndmg_z1 knife 150") parse("mp_wpndmg M249 22") parse("mp_wpndmg rocketlauncher 130") parse("mp_wpndmg rpglauncher 250") parse("mp_wpndmg airstrike 180") parse("mp_wpndmg AUG 15") parse("mp_wpndmg_z1 AUG 45") parse("mp_wpndmg flamethrower 45") parse("mp_wpndmg molotov 175")
2. (This is an alternate) Same as the 1. I want all spawned bots equiped with specific weapon ( tried unfunctional "player(id,"bot") or "player(i,"bot")" ).
Hope someone solve it.
2× editiert, zuletzt 15.11.14 13:14:02