1
2
3
4
5
6
2
3
4
5
6
timeonsrv = 0 addhook("second","timesec") function timesec(id) timeonsrv[id] = timeonsrv[id] + 1 end
timeonsrv = 0 addhook("second","timesec") function timesec(id) timeonsrv[id] = timeonsrv[id] + 1 end
timeonsrv = {} ----nw this variable is only for a particular player. if u dnt set table i mean same like what u have done ("timeonsrv = 0") then this variable is public! (a number value) addhook("join","j") function j(id) timeonsrv[id]=0 end addhook("second","timesec") function timesec() for id=1,32 do ----second hook doesnt have any value for"id" so we will set value for "id" in this way! timeonsrv[id] = timeonsrv[id] + 1 end end
timeonsrv = {} addhook("join","j") function j(id) timeonsrv[id]=0 end addhook("second","timesec") function timesec() for id=1,32 do timeonsrv[id] = timeonsrv[id] + 1 end end
timeonsrv = {} addhook("second","_second") addhook("join","_join") for id = 1, 32 do 	timeonsrv[id] = 0 end function _join(id) 	timeonsrv[id] = 0 end function _second() 	for id = 1, 32 do 	 timeonsrv[id] = timeonsrv[id] + 1 	end end
test={} addhook("join","j") function j(id) test[id]=0 end addhook("second","s") function s() for id=1,32 do if player(id,"exists") then test[id]=test[id]+1 end end end
table[id]for uninitialized players, because you iterate through IDs 1->32. So it tries to
nil + 1