sent your points to another player
anyway i forgot the error but here is my script
More
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
killpt = initArray(32) savestr={} function readfile(filelocation, linenum) 	saveline=1 	for line in assert(io.lines(filelocation)) do 		savestr[saveline]=line 		saveline=saveline+1 	end 	return savestr[linenum] end addhook("second","points_hud") function points_hud() for _, i in pairs(player(0,"table")) do if player(i,"exists") then parse('hudtxt2 '..i..' 3 "©255100000Points: '..killpt[i]..'" 30 130 0') end end end addhook("join","load_points") function load_points(id) 	if player(id,"usgn") ~= 0 then 		killpt[id] = readfile("sys/lua/Scores/"..player(id,"usgn")..".txt", 1)-1+1 	end end addhook("leave","save_points") function save_points(id) 	if player(id,"usgn") ~= 0 then 		local c = killpt[id] 		SScore = io.open("sys/lua/Scores/"..player(id,"usgn")..".txt", "w") 		SScore:write(""..c.."") 		SScore:close() 	end killpt[id] = 0 end addhook("startround","start") function start(id) for _, i in pairs(player(0,"table")) do if player(i,"exists") then 			menu(i,"Buy Menu,Snowball|Points: -2,Air Strike|Points: -3,Molotov Cocktail|Points: -3,Gut Bomb|Points: -2,Chainssaw|Points: -5,Claw|Points: -2,Medikit|Points: -1,Armor|Points: -5,More") 		end 	end end addhook("kill","player_kill") function player_kill(id) killpt[id] = killpt[id] + 1.5 end 	if title=="Buy Menu" then 		if button==1 then 			if killpt[id] >= 2 then 				killpt[id] = killpt[id] - 2 				parse("equip "..id.." 75") 				parse("setweapon "..id.." 75") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==2 then 			if killpt[id] >= 3 then 				killpt[id] = killpt[id] - 3 				parse("equip "..id.." 76") 				parse("setweapon "..id.." 76") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==3 then 			if killpt[id] >= 3 then 				killpt[id] = killpt[id] - 3 				parse("equip "..id.." 73") 				parse("setweapon "..id.." 73") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==4 then 			if killpt[id] >= 2 then 				killpt[id] = killpt[id] - 2 				parse("equip "..id.." 86") 				parse("setweapon "..id.." 86") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==5 then 			if killpt[id] >= 5 then 				killpt[id] = killpt[id] - 5 				parse("equip "..id.." 85") 				parse("setweapon "..id.." 85") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==6 then 			if killpt[id] >= 2 then 				killpt[id] = killpt[id] - 2 				parse("equip "..id.." 78") 				parse("setweapon "..id.." 78") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==7 then 			if killpt[id] >= 1 then 				killpt[id] = killpt[id] - 1 				parse("equip "..id.." 64") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==8 then 			if killpt[id] >= 5 then 				killpt[id] = killpt[id] - 5 				parse("equip "..id.." 80") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==9 then 			menu(id,"Buy Menu..,Medic Armor|Points: -10,Heavy Armor|Points: -7,Stealth Suit|Points: -9,Laser|Points: -60,RPG|Points: -25,Portal Gun|Points: -10,Flamethrower|Points: -15,Gas Granade|Points: -15") 		end 	end addhook("menu","usermenu") function usermenu(id,title,button) 	if title=="Buy Menu.." then 		if button==1 then 			if killpt[id] >= 10 then 				killpt[id] = killpt[id] - 10 				parse("equip "..id.." 82") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==2 then 			if killpt[id] >= 7 then 				killpt[id] = killpt[id] - 7 				parse("equip "..id.." 81") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==3 then 			if killpt[id] >= 9 then 				killpt[id] = killpt[id] - 9 				parse("equip "..id.." 84") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==4 then 			if killpt[id] >= 60 then 				killpt[id] = killpt[id] - 60 				parse("equip "..id.." 45") 				parse("setweapon "..id.." 45") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==5 then 			if killpt[id] >= 25 then 				killpt[id] = killpt[id] - 25 				parse("equip "..id.." 47") 				parse("setweapon "..id.." 47") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==6 then 			if killpt[id] >= 10 then 				killpt[id] = killpt[id] - 10 				parse("equip "..id.." 88") 				parse("setweapon "..id.." 88") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==7 then 			if killpt[id] >= 15 then 				killpt[id] = killpt[id] - 15 				parse("equip "..id.." 46") 				parse("setweapon "..id.." 46") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		elseif button==8 then 			if killpt[id] >= 15 then 				killpt[id] = killpt[id] - 15 				parse("equip "..id.." 72") 				parse("setweapon "..id.." 72") 			else 				msg2(id,"©255000000Error: Insufficient score to buy this item!") 			end 		end 	end	 end addhook("serveraction","help_button") function help_button(id,action) 	if action == 2 then 		menu(id,"Buy Menu,Snowball|Points: -2,Air Strike|Points: -3,Molotov Cocktail|Points: -3,Gut Bomb|Points: -2,Chainssaw|Points: -5,Claw|Points: -2,Medikit|Points: -1,Armor|Points: -5,More") 	end end
is there a way to improve this script
i want to add
@givepoints
@setpoints
everytime i try to make this scripts i always go error. so i really need your help guys.
edited 5×, last 06.03.13 07:45:56 pm