function minsute(id)
if level[id] >= 7 then
ms.money[id]=ms.money[id]+5
ms.moneyshow(id)
end
end
error = attemp to compare number with nil
pls help me
Scripts
Lua Scripts/Questions/Helpaddhook("minute","minsute")
function minsute()
	for id = 1, 32 then
		if level[id] >= 7 then
			ms.money[id]=ms.money[id]+5
			ms.moneyshow(id)
		end
	end
end
function Array(size,value)
local array = {}
for i = 1, size do
array[i]=value
end
return array
end
t_man = Array(32,false)
adminnokill = Array(32,false)
adminList = {0}
function isAdmin(id)
for _, usgn in ipairs(adminList) do
if player(id,'usgn')==usgn then
return true
end
end
return false
end
addhook([[join]],[[thejoin]])
function thejoin(id)
if isAdmin(id) then
msg("©000000255Admin "..player(id,"name").." enters the server!")
end
end
addhook([[team]],[[theteam]])
function theteam(id,t)
if isAdmin(id) then
if t==2 then
adminnokill[id]=true
t_man[id]=true
elseif t==1 then
t_man[id]=true
end
else
if t==1 then
parse("maket "..id)
return 1
end
end
end
addhook([[hit]],[[thehit]])
funtion thehit(id,source,weapon,hpdmg,apdmg)
if adminnokill[id]==true then
return 1
end
end
addhook([[serveration]],[[servation]])
funtion servation(id,ati)
if t_man[id]==true then
if ati == 3 then
local rot = player(id,[[rot]])
if rot < -90 then rot = rot + 360 end
local angle = math.rad(math.abs( rot + 90 )) - math.pi
local x = player(id,[[x]]) + math.cos(angle) * 25
local y = player(id,[[y]]) + math.sin(angle) * 25
if x > 0 and y > 0 and x < map([[xsize]]) * 32 and y < map([[ysize]]) * 32 then
parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
end
end
end
parse("msg Hello and Welcome at my Server")
msg ("Hello and Welcome at my Server")
-- Add this: license = initArray(32) -- & this inside of your Teleport function. if license[id] == 1 then 	-- TELEPORT-FUNCTION HERE else 	msg2(id,"©255000000You got no license!") end
... then 	license[id] = 1 end
pl_have_pos = Array(32,false) tele_x = Array(32,0) tele_y = Array(32,0) if men == [[Teleport Menu]] then 		if sel == 1 then 			if pl_have_pos[id]==true then 			rp_msg2(id,[[000255000]],[[Position stored succesfully!]]) 			rp_msg2(id,[[000255000]],[[X: ]]..player(id,[[x]])..[[ Y: ]]..player(id,[[y]])) 			tele_x[id] = player(id,[[x]]) 			tele_y[id] = player(id,[[y]]) 			pl_have_pos[id]=true end 	end end
pl_have_pos = Array(32,false) pl_desable_pos = Array(32,false) tele_x = Array(32,0) tele_y = Array(32,0) if men == [[Teleport Menu]] then 		if sel == 1 then 			if pl_have_pos[id]==true then 			tele_x[id] = player(id,[[32]]) 			tele_y[id] = player(id,[[32]]) 			pl_have_pos[id]=false 			rp_msg2(id,[[000255000]],[[Position not Stored]]) 			return 1 		end 			rp_msg2(id,[[000255000]],[[Position stored succesfully!]]) 			rp_msg2(id,[[000255000]],[[X: ]]..player(id,[[x]])..[[ Y: ]]..player(id,[[y]])) 			tele_x[id] = player(id,[[x]]) 			tele_y[id] = player(id,[[y]]) 			pl_have_pos[id]=true end 	end end
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i]=value
	end
	return array
end
t_man = Array(32,false)
adminnokill = Array(32,false)
adminList = {16138}
function isAdmin(id)
for _, usgn in ipairs(adminList) do
if player(id,'usgn')==usgn then
return true
end
end
return false
end
addhook([[join]],[[thejoin]])
function thejoin(id)
if isAdmin(id) then
msg("©000000255Admin "..player(id,"name").." enters the server!")
end
end
addhook([[team]],[[theteam]])
function theteam(id,t)
if isAdmin(id) then
if t==1 then
adminnokill[id]=true
t_man[id]=true
elseif t==2 then
t_man[id]=true
	 adminnokill[id]=fasle
		 end
else
if t==1 then
parse("makect "..id)
return 1
end
end
end
addhook([[hit]],[[thehit]])
function thehit(id,source,weapon,hpdmg,apdmg)
if adminnokill[id]==true then
return 1
end
end
addhook([[serveraction]],[[servaction]])
function servaction(id,acti)
if t_man[id]==true then
if acti == 3 then
local rot = player(id,[[rot]])
if rot < -90 then rot = rot + 360 end
local angle = math.rad(math.abs( rot + 90 )) - math.pi
local x = player(id,[[x]]) + math.cos(angle) * 25
local y = player(id,[[y]]) + math.sin(angle) * 25
if x > 0 and y > 0 and x < map([[xsize]]) * 32 and y < map([[ysize]]) * 32 then
parse([[setpos ]]..id..[[ ]]..x..[[ ]]..y)
end
end
end
end