1: With a trigger, could you use the for i=1,32 do for it?
2: I am trying to strip a primary weapon or secondary weapon if they have one, and equip another one, Can I see the type of weapons they have?
Scripts
Lua Scripts/Questions/Helpfunction addWeapon(id,wpnid, type)
	local haswpn
	for i, v in ipairs(playerweapons(id)) do
		if type == 1 then
			for j, k in ipairs{10,11,20,21,22,23,24,38,39,30,32,31,33,34,35,36,37,40} do
				if v == k then
					parse('strip '..id..' '..v)
					haswpn = true
					break
				end
			end
		else
			for j, k in ipairs{1,2,3,4,5,6} do
				if v == k then
					parse('strip '..id..' '..v)
					haswpn = true
					break
				end
			end
		end
		if haswpn then parse('equip '..wpnid) return true end
	end
	return false
end
msg([b]"©255000000'[/b]..player(id,"name")..[b]' is noob!"[/b])
'string'
"string"
'string"
"string'
addhook('team','onSelectTeam')
function onSelectTeam(id, team, look)
	if team == 2 then
		return 1
	end
end



-- Projectiles Stuff Example --
-- Lua Scripting Tutorial Example
-- Not Finshed --
obj = {x = {}, y = {}, rot = {}, img = {}, id = {}}
addhook("always","obj_update")
addhook("attack","obj_add")
function obj_remove(id)
	local k, v
	if obj.img[id] then freeimage(obj.img[id]) end
	for k, v in pairs(obj) do table.remove(obj[k], id) end
end
function obj_add(p)
	local x , y, rot , id = player(p,"x"), player(p,"y"), player(p,"rot")
	id = image("gfx/sprites/flare2.bmp",x,y,1)
	imageblend(id, 1)
	table.insert(obj.img, id)
	table.insert(obj.x, x)
	table.insert(obj.y, y)
	table.insert(obj.id, p)
	table.insert(obj.rot, rot)
end
function obj_update()
	local del, id, n = {}
	for id, n in pairs(obj.img) do
		obj.x[id] = obj.x[id] + math.cos(math.rad(obj.rot[id] - 90)) * 10
		obj.y[id] = obj.y[id] + math.sin(math.rad(obj.rot[id] - 90)) * 10
		imagepos(n, obj.x[id], obj.y[id], obj.rot[id])
		if tile( math.ceil(obj.x[id] / 32) - 1, math.ceil(obj.y[id] / 32) - 1, "wall") then
			parse("explosion "..obj.x[id].." "..obj.y[id].." 50 250 "..obj.id[id])
			table.insert(del, id)
		end
	end
	for id, n in ipairs(del) do obj_remove(n) end
end
LUA ERROR:sys/lua/samples/Bounty_Hunter_DEMO.lua:61:attemp to index field 'mainmenu' (a function value)