1. The command !resetscore so evryone can reset hes score
2. !nobots sometimes i add bots so i need the command !nobots if the users dont like them
so they can kick them
Scripts
cmd to reset score / remove bots
cmd to reset score / remove bots
1

so they can kick them
addhook("say","cmds")
function cmds(p,t)
	if(t=="!resetscore") then
		parse("setscore "..p.." 0")
		parse("setdeaths "..p.." 0")
	elseif(t=="!nobots") then
		for _,v in pairs(player(0,"table")) do
			if(player(v,"bot")==true) then
				parse("kick "..v)
			end
		end
	end
end
if you can help me local lockt = false
local lockct = false
addhook("say","cmds")
function cmds(p,t)
	if(t=="!resetscore") then
		parse("setscore "..p.." 0")
		parse("setdeaths "..p.." 0")
	elseif(t=="!nobots") then
		for _,v in pairs(player(0,"table")) do
			if(player(v,"bot")==true) then
				parse("kick "..v)
			end
		end
	elseif(t=="@lockt") then
		lockt = true
	elseif(t=="@lockct") then
		lockct = true
	elseif(t=="@unlockall") then
		lockt = false
		lockct = false
	end
end
addhook("team","change")
function change(id, team)
	if (player(id,"team")) == 1 then
		if lockt == true then
			return 1
		end
	elseif(player(id,"team")) == 2 then
		if lockct == true then
			return 1
		end
	end
end
and the script Unlock All lockt = false
lockct = false
addhook("say","cmds")
function cmds(p,t)
if(t=="!resetscore") then
parse("setscore "..p.." 0")
parse("setdeaths "..p.." 0")
elseif(t=="!nobots") then
for _,v in pairs(player(0,"table")) do
if(player(v,"bot")==true) then
parse("kick "..v)
end
end
elseif(t=="@lockt") then
lockt = true
elseif(t=="@lockct") then
lockct = true
elseif(t=="@unlockall") then
lockt = false
lockct = false
end
end
addhook("team","change")
function change(id, team)
if (player(id,"team")) == 1 then
if lockt == true then
return 1
end
elseif(player(id,"team")) == 2 then
if lockct == true then
return 1
end
end
end
lockt = false
lockct = false
addhook("say","cmds")
function cmds(p,t)
	if(t=="!resetscore") then
		parse("setscore "..p.." 0")
		parse("setdeaths "..p.." 0")
		msg(player(p,"name").." has reset their score.")
	elseif(t=="!nobots") then
		for _,v in pairs(player(0,"table")) do
			if(player(v,"bot")==true) then
				parse("kick "..v)
			end
		end
		msg("All bots have been removed.")
	elseif(t=="@lockt") then lockt = true
	elseif(t=="@lockct") then lockct = true
	elseif(t=="@unlockall") then
		lockt = false
		lockct = false
	else return 0 end
	return 1
end
addhook("team","change")
function change(id, team)
	if team == 1 then
		if lockt == true then
			msg2(id,"©255000000This team is locked!")
			return 1
		end
	elseif team == 2 then
		if lockct == true then
			msg2(id,"©255000000This team is locked!")
			return 1
		end
	end
end
bot_remove_all removes all bots from the server. Insignificant gain in efficiency but just something that may come in handy.
tomorow i will try to put again the @lockt @lockct @unlockall commands because i think the error is in my scripts
thank you bannan
1
