If there are less then 24 players a bot joins in spec mode, and if there are over 24 players the bot is kicked.
Any help?
Scripts
Lua Scripts/Questions/Helpaddhook("say","player_say")
function player_say(id,txt)
if(txt=="!usp") then
parse("equip "..id.." 1")end
if(txt=="!glock") then
parse("equip "..id.." 2")end
if(txt=="!deagle") then
parse("equip "..id.." 3")end
end
end
(name, trigger)
(trigger)
(339) and he equip wen click that trigger!! addhook("use","player_use")
function player_use(id,trigger)
if(trigger=="339") then
parse("equip "..id.." 1")end
if(trigger=="337") then
parse("equip "..id.." 2")end
if(trigger=="338") then
parse("equip "..id.." 3")end
end
end
addhook ("hit",hitt")
function hitt(id,source,iid,weapon)
if weapon==yourweapon then
parse ("setpos "..id.." x y")
end
end
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
god=initArray(32)
addhook("say","god_mode")
function god_mode(id,txt)
if(txt=="/god") then
if god[id]==0 then
god[id]=1
msg2(id,"©000255000God ON! @C")
elseif god[id]==1 then
god[id]=0
msg2(id,"©255000000God OFF! @C")
end
end
end
addhook("hit","god_on")
function god_on(id,source,weapon,hpdmg,apdmg)
if god[id]==1 then
	return 1
	end
end

-- Script By Blazzingxx
addhook("attack","FiveSevenTeleport")
function FiveSevenTeleport(id)
	if (player(id,"weapontype") == 6) then
		local b = { x = player(id,"x"), y = player(id,"y"), dir = math.rad(player(id,"rot") - 90) }
		local i, nx, ny
		while true do
			nx = b.x + math.cos(b.dir) * 16
			ny = b.y + math.sin(b.dir) * 16
			if not tile((nx / 32) - 1,(ny / 32) - 1,"walkable") then
				if i then parse(string.format("setpos %s %s %s",id,b.x - 16,b.y - 16)) end
				msg2(id,"©000255000Teleport!@C")
				break
			else
				parse(string.format('effect "fire" %s %s %s',b.x,b.y,1,1))
				b.x, b.y = nx, ny
				i = true
			end
		end
	end
end
if (txt=="/god") then
if (txt=="!god") then
local jpx=0
local jpy=0
addhook("say","savpos")
function savpos(i,t)
if (t=="savepos") then
	local jpx=player(i,"x")
	local jpy=player(i,"y")
end
end
addhook("hit","fiveseventele")
function fiveseventele(vic,src,wp)
	if (wp==6) then
		parse('setpos '..vic..' '..jpx..' '..jpy)
	return 1
	end
end
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i]=value
	end
	return array
end
player_counted = Array(32,"false")
player_count = 0
pbk >= 25
addhook("join","join")
addhook("spawn","spawn")
addhook("leave","leave")
addhook("ms100","ms")
function join(id)
	if player_counted[id]=="false" then
		player_count = player_count+1
		player_counted[id]="true"
	end
end
function leave(id)
	player_count = player_count-1
	player_counted[id]="false"
end
function spawn(id)
	if player_counted[id]=="false" then
		player_counted[id]="true"
		player_count=player_count+1
	end
end
function ms()
	if player_count >= 24 then
		for id=1,32 do
			if player(id,"bot") then
				parse("kick "..id)
			end
		end
	else
		parse("bot_add")
	end
end
p_w = 6 -- Weapon That Takes Player To Prison , Five Seven (6)
only_admins = "true" -- If You Want Just To Be Used For Admins
admins = {22068} -- Put Your Usgn If You Want More Than 1 Then Put ,#usgn
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i]=value
	end
	return array
end
function table.find(table,value)
for i,v in ipairs(table) do
if v == value then
return true
end
end
end
prisoned = Array(32,"false")
spawn_x = Array(32,0)
spawn_y = Array(32,0)
prison_x = Array(32,0)
prison_y = Array(32,0)
temp_adm = Array(32,"false")
mode = Array(32,0)
modeb = Array(32,"Nothing/None")
function adm(pl)
	local val
	local usgn = player(pl,"usgn")
	if table.find(admins,usgn) then
		val = "true"
	else
		val = "false"
	end
	return val
end
addhook("leave","p_leave")
function p_leave(id)
	prisoned[id]="false"
	mode[id]="false"
	spawn_y[id]="false"
	spawn_x[id]="false"
	prison_y[id]="false"
	prison_x[id]="false"
	temp_adm[id]="false"
end
addhook("hit","p_hit")
function p_hit(id,source,weapon,hpdmg,apdmg)
	if weapon == p_w then
		if mode[id]==1 then
			if prison_x[source] => 1 or prison_y =>[source] 1 then
				parse("setpos "..id.." "..prison_x[source].." "..prison_y[source])
				spawn_x[id] = prison_x[source]
				spawn_y[id] = prison_y[source]
				prisoned[id]="true"
				parse("sv_msg2 "..source.." You Prisoned "..player(id,"name"))
				parse("sv_msg2 "..id.." You Are Prisoned By "..player(source,"name"))
				parse('effect "colorsmoke" '..player(id,"x")..' '..player(id,"y")..' 1 1 0 200 0')
			else
				parse("sv_msg2 "..source.." You Don't Have Prision Position")
			end
			return 1
		elseif mode[id]==2 then
			if prisoned[id]=="true" then
				prisoned[id]="false"
				parse("sv_msg2 "..source.." You UnPrisoned "..player(id,"name"))
				parse("sv_msg2 "..id.." "..player(source,"name").." UnPrisoned You")
				parse('effect "colorsmoke" '..player(id,"x")..' '..player(id,"y")..' 1 1 0 0 255')
			else
				prisoned[id]="true"
				parse("sv_msg2 "..source.." You Prisoned "..player(id,"name"))
				parse("sv_msg2 "..id.." "..player(source,"name").." Prisoned You")
				parse('effect "colorsmoke" '..player(id,"x")..' '..player(id,"y")..' 1 1 255 0 0')
			end--91646165
			return 1
		else
			return 0
		end
	end
end
addhook("spawn","p_spawn")
function p_spawn(id)
	if prisoned[id]="true" then
		parse("setpos "..id.." "..spawn_x[id].." "..spawn_y[id])
	end
end
addhook("serveraction","f2")
function f2(id,action)
	if action==1 then -- If Pressed F2 Appear Prison Menu, 2 For F3 and 3 For F4
		if only_admins=="true" then
			if adm(id)=="true" or temp_adm[id]=="true" then
				menu(id,"Prison Pos@b,Set Prison Pos,Pos_x:|"..prison_x[id]..",Pos_y:|"..prison_y[id]..",Mode|"..mode[id])
			end
		else
			menu(id,"Prison Pos@b,Set Prison Pos,Pos_x:|"..prison_x[id]..",Pos_y:|"..prison_y[id]..",Mode|"..modeb[id])
		end
	end
end
addhook("menu","menu")
function menu(id,t,b)
x = player(id,"x")
y = player(id,"y")
	if t == [[Prison Pos]] then
		if b==1 then
			prison_x[id]=x
			prison_y[id]=y
			parse("sv_msg2 "..id.." Position Saved")
			mode[id]=1
		elseif b==2 then
			prison_x[id]=x
		elseif b==3 then
			prison_y[id]=y
		elseif b==4 then
			if mode[id]==0 then
				mode[id]=1
				modeb[id]="Take To Prison"
			elseif mode[id]==1 then
				mode[id]=2
				modeb[id]="Prison/UnPrison"
			end	
		end
	end
end
addhook("parse","parse")
function parse(text)
	if string.sub(text,1,8)=="temp_adm" then
		vic_id = string.sub(text,10)
		temp_adm[vic_id]="true"
		parse("sv_msg2 "..id.." You Give "..player(vic_id,"name").." Temporal Admin")
		parse("sv_msg2 "..vic_id.." "..player(id,"name").." Give You Temporal Admin")
	end
end
function Array(size,value)
	local array = {}
	for i = 1, size do
		array[i]=value
	end
	return array
end
god = Array(32,0)
addhook("say","god_mode")
function god_mode(id,txt)
	if (txt=="!god") then
		if god[id]==0 then
			god[id]=1
			msg2(id,"©000255000God ON! @C")
		elseif god[id]==1 then
			god[id]=0
			msg2(id,"©255000000God OFF! @C")
		end
	end
end
addhook("hit","god_on")
function god_on(id)
	if god[id]==1 then
		return 1
end
end
addhook("ms100","hook_ms100_botscript")
local botishere=0
function hook_ms100_botscript()
if #player(0,"table") >=24 then
	if botishere==1 then
	for i=1,#player(0,"table") do
	if player(i,"bot") then
	parse("kick "..i)
	botishere=0
	end
	end
	end
elseif #player(0,"table")<24 and botishere~=1 then
	parse("bot_add")
	botishere=1
end
addhook("ms100","hook_ms100_botscript")
local botishere=0
function hook_ms100_botscript()
if #player(0,"table") >=24 then
	if botishere==1 then
	for i=1,#player(0,"table") do
	if player(i,"bot") then
	parse("kick "..i)
	botishere=0
	end
	end
	end
elseif #player(0,"table")<24 and botishere~=1 then
	parse("bot_add")
	botishere=1
end
addhook("ms100","hook_ms100_botscript")
local botishere=0
function hook_ms100_botscript()
if #player(0,"table") >=24 then
	if botishere==1 then
	for i=1,#player(0,"table") do
	if player(i,"bot") then
	parse("kick "..i)
	botishere=0
	end
	end
	end
elseif #player(0,"table")<24 and botishere~=1 then
	parse("bot_add")
	botishere=1
end

botishere=0
addhook("ms100","hook_ms100_botscript")
function hook_ms100_botscript()
	if (#player(0,"table")>=24) then
		if botishere==1 then
			for i=1,#player(0,"table") do
				if (player(i,"bot")) then
					parse("kick "..i)
					botishere=0
				end
			end
		end
	elseif #player(0,"table")<24 and botishere~=1 then
		parse("bot_add")
		botishere=1
	end
end
addhook("ms100","hook_ms100_botscript")
local botishere=0
function hook_ms100_botscript()
	if #player(0,"table") >=24 then
		if botishere==1 then
			for i=1,#player(0,"table") do
				if player(i,"bot") then
					parse("kick "..i)
		botishere=0
				end
			end
		end
	elseif #player(0,"table")<24 and botishere~=1 then
		parse("bot_add")
	botishere=1
	end
end