use a loop:
1
2
3
4
5
2
3
4
5
for id=1,32 do 	if player(id,"exists") then 		--insert your other code here 	end end
for id=1,32 do 	if player(id,"exists") then 		--insert your other code here 	end end
t = {1,2,3,4,{5,6,7},8,9} print(table.tostring(t))	--> {1234{567}89}
for id=1,32 do 	if player(id,"exists") then 		--insert your other code here 	end end
local a = player(0,"table") for i=1,#a do 	player(a[i],"health")--stuff end --vs-- for i=1,32 do 	if player(i,"exists") do 		player(i,"health")--stuff 	end end
function dectohex(n) 	if type(n) == "string" then 		n=tonumber(n) 	end 	if not n then return nil end 	 	return string.format("0x%X", n) --RETURNS A STRING end function hextodec(n) --NEEDS A STRING STARTING WITH 0x or 0X 	if type(n) == string then 		return string.format("%i",n) --RETURNS A STRING 	end end
local usgn, i = player(id,"usgn") if (usgn > 0) then local f = (io.open('sys/lua/license/'..player(id,"usgn")..'.txt','r')) if f then msg2(id,'Loading...^^!@C') for line in f:lines() do i = 1 if (i == 1) then rp_license[id] = value(line) else break end end f:close() i = 1 else msg2(id,'We are sorry, but failed to load save!@C') end else msg2(id,'Please Check Your U.S.G.N. Account Settings!@C') end end end
function Array(size,value) 	local array = {} 	for i = 1, size do 		array[i]=value 	end 	return array end rp_license = Array(32,false)
addhook("die","npc_die") function npc_die() 	if player == NPC then 		parse("trigger YOUR TRIGGER HERE") 	end end
addhook("hit","healammo") function healammo(victim,source,weapon) if player(victim,"team") == player(source,"team") then if weapon == 75 then parse("spawnitem 65 "..player(source,"tilex").." "..player(source,"tiley")) return 1 elseif weapon == 86 then parse("spawnitem 61 "..player(source,"tilex").." "..player(source,"tiley")) parse("spawnitem 62 "..player(source,"tilex").." "..player(source,"tiley")) return 1 end end end
addhook("die","npc_die") function npc_die() 	if player == NPC then 		parse("trigger YOUR TRIGGER HERE") 	end end
addhook("objectkill","_objectkill") function _objectkill(id,pl)--Object ID, player id 	if object(id,"type") == 30 then --If npc 		parse("trigger YOURTRIGGERNAME") 	end end
local a = player(0,"table") for i=1,#a do 	player(a[i],"health")--stuff end --vs-- for i=1,32 do 	if player(i,"exists") do 		player(i,"health")--stuff 	end end
local t = player(0,"table") for i=1,#t do 	print(player(t[i],"health")) end
local usgn, i = player(id,"usgn") if (usgn > 0) then local f = (io.open('sys/lua/license/'..player(id,"usgn")..'.txt','r')) if f then msg2(id,'Loading...^^!@C') for line in f:lines() do i = 1 if (i == 1) then rp_license[id] = value(line) else break end end f:close() i = 1 else msg2(id,'We are sorry, but failed to load save!@C') end else msg2(id,'Please Check Your U.S.G.N. Account Settings!@C') end end end
function Array(size,value) 	local array = {} 	for i = 1, size do 		array[i]=value 	end 	return array end rp_license = Array(32,false)
function hook_build_arena(id,typ,x,y,mode,objectid) 	if arena.enabled == 1 then 		if typ == 20 then -- Mine 			parse("equip "..id.." 77") 		elseif typ == 21 then -- Laser Mine 			-- get rotation of the object by it's id 			local rot = object(objectid,"rot") 			print("spawnobject 21 "..x.." "..y.." "..rot.." "..mode.." 0 0") 			parse("spawnobject 21 "..x.." "..y.." "..rot.." "..mode.." 0 0") 			parse("equip "..id.." 87") 			return 1 		end 	end end