Re: Lua Scripts/Questions/Help
Deleted Userbots dont has wrench (construction)
only ak 47
and players cant join to terrorists if he click on the terrorist force automaticly makes counter terrorists (makect)
Scripts
Lua Scripts/Questions/Help
Re: Lua Scripts/Questions/Helpaddhook("spawn","cons_nowrench")
function cons_nowrench(id)
	if game("sv_gm")==3 then
		if player(id,"bot") then
			parse("equip "..id.." 30") -- Give AK
			parse("strip "..id.." 74") -- Remove wrench from bot
		end
	end
end
addhook("team","no_ts")
function no_ts(id,team
	if (team == 1) then
		parse("makect "..id) -- Automatic go CT who want join T's
		msg2(id,"No Terrorists allowed!")
	end
end
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
level=initArray(32)
exp=initArray(32)
credits=initArray(32)
hacker=initArray(32)
function string.split(text,b)
local cmd = {}
if b then
b = b
else
b = "%s"
end
b = "[^"..b.."]+"
for o in string.gmatch(text,b) do
table.insert(cmd,o)
end
return cmd
end
if hacker==nil then hacker={} end
hacker={}
addhook("second","hack")
function hack()
if (hacker[id]==1) then
credits[id]=credits[id]+15
	end
end
addhook("spawn","class")
function class(id)
parse("equip "..id.." 56") -- Equips Ct's with defuse kit.
hacker[id] = 1 -- The Hacker Special is on
	parse("strip "..id)
addhook("second","kills_gui")
function kills_gui()
	kills_gui_create(p)
end
function kills_gui_create(p)
	for p = 1,32 do
		if player(p,"exists") then
			text = ("©000255000Kills : "..kills.." | Deaths : "..deaths)
			x = 235
			y = 400
			parse('hudtxt 1 '..p..' "'..text..'" '..x..' '..y)
		end
	end
end
addhook("second","kills_gui")
function kills_gui()
	kills_gui_create(p)
end
function kills_gui_create(p)
	for p = 1,32 do
		if player(p,"exists") then
			text = ("©000255000Kills : "..kills.." | Deaths : "..deaths)
			x = 235
			y = 400
			parse('hudtxt 1 '..p..' "'..text..'" '..x..' '..y)
		end
	end
end
text = ('©000255000Kills : '..kills..' | Deaths : '..deaths)

lol = {123,156,14896}
a = {12,32}
lol = {lol..a}
print(lol[4])
--should print 12
weinow i knowlol = {123,156,14896}
a = {12,32}
lol = {lol..a}
print(lol[4])
--should print 12
weiß jetz schon
:table.insert(<tablename>,<things to insert>)
:table.insert(<tablename>,<things to insert>)
I didn't knew you found out how, because you wrote in Deutsch!
addhook("say","broadcast") function broadcast(id,t)
if string.sub(t,1,10) == "!broadcast" then
local bt = string.sub(t,12)
msg("©000255000"..player(id,"name").."(Broadcast): "..bt)
end
end
addhook([[hit]],[[mt2_hit]]) function mt2_hit(id,source,weapon,hpdmg,apdmg) 	player(source,"health")-hpdmg*str[id]/def[source] end
addhook([[hit]],[[mt2_hit]]) function mt2_hit(id,source,weapon,hpdmg,apdmg) 	player(source,"health")-hpdmg*str[id]/def[source] end
player(source,"health")=player(source,"health")-hpdmg*str[id]/def[source]
parse([[sethealth ]]..id..[[ ]]..player(id,"health")-hpdmg*str[source]/def[id])
function minuted()
	ttiv = ttiv + 1
	if ttiv >= 1440 then
		for l in io.lines("sys/lua/tempvips/all.txt") do
			local line = totable(l)
			for i = 1,#line do
				for li in io.lines("sys/lua/tempvips/"..tonumber(line[i])..".txt") do
					local lines = totable(li)
					if lines[1] == 0 then
						--nix
					elseif lines[1] == 1 then
						local file = assert(io.open("sys/lua/tempvips/"..tonumber(line[i])..".txt","w"))
						file:write("fart")
						file:close()
						local file = assert(io.open("sys/lua/tempvips/all.txt"),"w")
						if tonumber(lines[1]) ~= 1 then
							file:write(tonumber(line[i]).."\n")
						end
						file:close()
						for is = 1,#tempviplist do
							if tempviplist[is] == tonumber(line[i]) then
								table.remove(tempviplist,is)
							end
						end
					elseif lines[1] == 2 then
						local file = assert(io.open("sys/lua/tempvips/"..tonumber(line[i])..".txt","w"))
						file:write("1")
						file:close()
					elseif lines[1] == 3 then
						local file = assert(io.open("sys/lua/tempvips/"..tonumber(line[i])..".txt","w"))
						file:write("2")
						file:close()
					elseif lines[1] == 4 then
						local file = assert(io.open("sys/lua/tempvips/"..tonumber(line[i])..".txt","w"))
						file:write("3")
						file:close()
					elseif lines[1] == 5 then
						local file = assert(io.open("sys/lua/tempvips/"..tonumber(line[i])..".txt","w"))
						file:write("4")
						file:close()
					end
				end
			end
		end
		ttiv = 0
	end
end
players_online = 0
addhook("join","add_player")
function add_player(id)
	players_online = players_online + 1
end
addhook("leave","remove_player")
function remove_player(id,reason)
	players_online = players_online - 1
end
addhook("second","player_hud")
function player_hud()
	for id = 1,32 do
		if player(id,"exists") then
			display_player_hud(id)
		end
	end
end
function display_player_hud(id)
text = ("©000255000| Players online : "..players_online.." |")
y = 50
x = 100
align = 1
parse('hudtxt '..id..' "'..text..'" '..x..' '..y)
end
4 21 51
players_online = 0
addhook("join","add_player")
function add_player(id)
	players_online = players_online + 1
end
addhook("leave","remove_player")
function remove_player(id,reason)
	players_online = players_online - 1
end
addhook("second","player_hud")
function player_hud()
	for id = 1,32 do
		if player(id,"exists") then
			display_player_hud(id)
		end
	end
end
function display_player_hud(id)
text = ("©000255000| Players online : "..players_online.." |")
y = 50
x = 100
align = 1
parse('hudtxt2 '..id..' 1 "'..text..'" '..x..' '..y..' -1')
end