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
196
197
198
199
200
201
202
203
addhook("always","zj_hud")
function zj_hud()
	for _, id in pairs(player(0,"table")) do
		name[id] = player(id,"name")
		zj_10_50[id] = math.random(1,10)
		zj_25_50[id] = math.random(1,5)
		zj_10_100[id] = math.random(1,16)
		zj_25_100[id] = math.random(1,8)
		zj_player_health[id] = player(id,"health")
		parse('hudtxt2 '..id..' 1 "©020255020MONEY: $'..zj_player_money[id]..' " 16 16')
		parse('hudtxt2 '..id..' 2 "©255040040HEALTH: '..zj_player_health[id]..' " 16 32')
		parse('hudtxt2 '..id..' 3 "©005055255CLOTHING: '..zj_player_armor[id]..' " 16 48')
		parse('hudtxt2 '..id..' 4 "©220220220NAME: '..name[id]..' " 16 64')
		parse('hudtxt2 '..id..' 5 "©255050255KNOWLEDGE: '..zj_player_knowledge[id]..'% " 16 96')
		parse('hudtxt2 '..id..' 7 "©155055000HUNGER & THIRST: '..zj_player_hunger[id]..'% | '..zj_player_thirst[id]..'% " 16 112')
		parse('hudtxt2 '..id..' 8 "©255128000LEVEL: Level '..zj_player_lvl[id]..' | '..zj_player_exp[id]..'/'..SV_ExperienceNeeded..' " 16 128')
		parse('hudtxt2 '..id..' 9 "©155155155WEAPON: '..zj_player_equip[id]..' " 16 144')
		if zj_criminal[id] == 0 then
			parse('hudtxt2 '..id..' 10 "©255155155STATUS: CITIZEN " 16 160')
		elseif zj_criminal[id] == 1 then
			parse('hudtxt2 '..id..' 10 "©255155155STATUS: WANTED " 16 160')
		elseif zj_criminal[id] == 2 then
			parse('hudtxt2 '..id..' 10 "©255155155STATUS: ANTI-CRIMINAL " 16 160')
		end
		if (zj_player_money[id] >= -999999 and zj_player_money[id] <= -1) then
			zj_player_money[id] = 0
		end
		if (zj_player_knowledge[id] >= -999999 and zj_player_knowledge[id] <= -1) then
			zj_player_knowledge[id] = 0
		end
		if zj_player_knowledge[id] >= 101 then
			zj_player_knowledge[id] = 100
		end
		if (zj_player_hunger[id] >= -999999 and zj_player_hunger[id] <= -1) then
			zj_player_hunger[id] = 0
		end
		if zj_player_hunger[id] >= 101 then
			zj_player_hunger[id] = 100
		end
		if (zj_player_thirst[id] >= -999999 and zj_player_thirst[id] <= -1) then
			zj_player_thirst[id] = 0
		end
		if zj_player_thirst[id] >= 101 then
			zj_player_thirst[id] = 100
		end
		if player(id,"weapontype") == 0 then
			zj_player_equip[id] = "None"
			parse("equip "..id.." 50")
			parse("setweapon "..id.." 50")
		elseif player(id,"weapontype") == 1 then
			zj_player_equip[id] = "Pistol with Silencer"
		elseif player(id,"weapontype") == 2 then
			zj_player_equip[id] = "Bursting Pistol"
		elseif player(id,"weapontype") == 3 then
			zj_player_equip[id] = "Deagle"
		elseif player(id,"weapontype") == 6 then
			zj_player_equip[id] = "Pistol"
		elseif player(id,"weapontype") == 10 then
			zj_player_equip[id] = "Shotgun"
		elseif player(id,"weapontype") == 11 then
			zj_player_equip[id] = "Semi-Automatic Shotgun"
		elseif player(id,"weapontype") == 21 then
			zj_player_equip[id] = "Mini SMG"
		elseif player(id,"weapontype") == 22 then
			zj_player_equip[id] = "Automatic Rifle"
		elseif player(id,"weapontype") == 23 then
			zj_player_equip[id] = "SMG"
		elseif player(id,"weapontype") == 30 then
			zj_player_equip[id] = "AK-47"
		elseif player(id,"weapontype") == 32 then
			zj_player_equip[id] = "Rifle with Silencer"
		elseif player(id,"weapontype") == 34 then
			zj_player_equip[id] = "Sniper"
		elseif player(id,"weapontype") == 35 then
			zj_player_equip[id] = "AWP Sniper"
		elseif player(id,"weapontype") == 40 then
			zj_player_equip[id] = "Machine Gun"
		elseif player(id,"weapontype") == 41 then
			zj_player_equip[id] = "Shield"
		elseif player(id,"weapontype") == 45 then
			zj_player_equip[id] = "Laser"
		elseif player(id,"weapontype") == 46 then
			zj_player_equip[id] = "Flamethrower"
		elseif player(id,"weapontype") == 47 then
			zj_player_equip[id] = "RPG Laucher"
		elseif player(id,"weapontype") == 50 then
			zj_player_equip[id] = "Melee"
		elseif player(id,"weapontype") == 51 then
			zj_player_equip[id] = "Grenade"
		elseif player(id,"weapontype") == 69 then
			zj_player_equip[id] = "Machete"
		elseif player(id,"weapontype") == 73 then
			zj_player_equip[id] = "Molotov Cocktail"
		elseif player(id,"weapontype") == 76 then
			zj_player_equip[id] = "Airstrike Call"
		elseif player(id,"weapontype") == 77 then
			zj_player_equip[id] = "Land Mine"
		elseif player(id,"weapontype") == 85 then
			zj_player_equip[id] = "Chainsaw"
		elseif player(id,"weapontype") == 86 then
			zj_player_equip[id] = "Meat"
		elseif player(id,"weapontype") == 87 then
			zj_player_equip[id] = "Laser Mine"
		elseif player(id,"weapontype") == 88 then
			zj_player_equip[id] = "Portal Generator"
		end
		if zj_player_speed[id] == 0 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: ---------- " 16 80')
			parse("speedmod "..id.." 0")
		elseif zj_player_speed[id] == 1 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: |--------- " 16 80')
			parse("speedmod "..id.." 1")
		elseif zj_player_speed[id] == 2 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: ||-------- " 16 80')
			parse("speedmod "..id.." 2")
		elseif zj_player_speed[id] == 3 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: |||------- " 16 80')
			parse("speedmod "..id.." 3")
		elseif zj_player_speed[id] == 4 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: ||||------ " 16 80')
			parse("speedmod "..id.." 4")
		elseif zj_player_speed[id] == 5 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: |||||----- " 16 80')
			parse("speedmod "..id.." 5")
		elseif zj_player_speed[id] == 6 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: ||||||---- " 16 80')
			parse("speedmod "..id.." 6")
		elseif zj_player_speed[id] == 7 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: |||||||--- " 16 80')
			parse("speedmod "..id.." 7")
		elseif zj_player_speed[id] == 8 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: ||||||||-- " 16 80')
			parse("speedmod "..id.." 8")
		elseif zj_player_speed[id] == 9 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: |||||||||- " 16 80')
			parse("speedmod "..id.." 9")
		elseif zj_player_speed[id] == 10 then
			parse('hudtxt2 '..id..' 6 "©000255255SPEED: |||||||||| " 16 80')
			parse("speedmod "..id.." 10")
		end
		if zj_player_speed[id] >= 11 then
			zj_player_speed[id] = 10
		end
		if zj_player_exp[id] >= SV_ExperienceNeeded then
			zj_player_exp[id] = zj_player_exp[id]-SV_ExperienceNeeded
			zj_player_lvl[id] = zj_player_lvl[id]+1
			parse('effect "colorsmoke" '..player(id,"x")..' '..player(id,"y")..' 0 0 255 255 255')
			msg("©255255255"..player(id,"name").." leveled up!")
			zj_list11menu(id)
		end
		if zj_player_lvl[id] == 0 then
			zj_player_lvl[id] = 1
		end
		if zj_player_hat[id] == 0 then
			freeimage(id)
		elseif zj_player_hat[id] == 1 then
			freeimage(id)
			id=image("gfx/ZJ's_City/Hat_RD.png",1,1,200+id)
		elseif zj_player_hat[id] == 2 then
			freeimage(id)
			id=image("gfx/ZJ's_City/Hat_BL.png",1,1,200+id)
		elseif zj_player_hat[id] == 3 then
			freeimage(id)
			id=image("gfx/ZJ's_City/Hat_PH.png",1,1,200+id)
		end
		if player(id,"armor") == 0 then
			zj_player_armor[id] = "None"
		elseif (player(id,"armor") >= 1 and player(id,"armor") <= 200) then
			zj_player_armor[id] = "Destroyable ("..player(id,"armor")..")"
		elseif player(id,"armor") == 201 then
			zj_player_armor[id] = "Small Suit"
		elseif player(id,"armor") == 202 then
			zj_player_armor[id] = "Medium Suit"
		elseif player(id,"armor") == 203 then
			zj_player_armor[id] = "Large Suit"
		elseif player(id,"armor") == 204 then
			zj_player_armor[id] = "Healing Suit"
		elseif player(id,"armor") == 205 then
			zj_player_armor[id] = "Admin Suit"
		elseif player(id,"armor") == 206 then
			zj_player_armor[id] = "Camouflage"
			freeimage(id)
		end
		if zj_player_money[id] >= 5001 then
			zj_player_money[id] = 5000
		end
		if zj_ride[id] == 1 then
			freeimage(id)
			id=image("gfx/ZJ's_City/Car.png",1,1,132+id)
			parse('hudtxt2 '..id..' 11 "©255255000FUEL: '..zj_player_fuel[id]..' " 16 176')
			if zj_player_fuel[id] >= 1 then
				parse("speedmod "..id.." 20")
			else
				parse("speedmod "..id.." -100")
			end
		else
			parse('hudtxt2 '..id..' 11 "" 16 176')
		end
		if player(id, "money") >= 1 then
			parse("setmoney ".. id .." 0")
		end
	end
end