There are few jobs in my script and they are limited (exemple: police/limit2)
im using these codes(exemple)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function initArray(m) 	local array = {} 	for i = 1, m do 		array[i]=0 	end 	return array end playerjob=initArray(32) police=0 addhook("leave","hhleave") function hhleave(id) if playerjob[id]>0 then police=police-1 end end
But it has bug...When player get lag and he lost connection, leave hook isnt working and there is no player but it shows there is 1 police...do you understant me?How can i solve this problem?