1
2
2
F2 = Menu 1 godmode
edited 2×, last 13.02.17 01:21:24 pm
F2 = Menu 1 godmode
function createArray(size,value) 	local array = {} 	for i = 1, size do 		array[i]=value 	end 	return array end gm_Admins = {155954} -- ENTER USGN HERE YOU CAN ADD MORE ADMINS WITH , (0,1,2,3...) gm_mode = createArray(32,false) gm_Admin = createArray(32,false) addhook("hit","gm_hit") addhook("menu","gm_menu") addhook("join","gm_join") addhook("leave","gm_leave") addhook("serveraction","gm_serveraction") function gm_hit(id,source) 	if gm_mode[id]==false then 		return 0 	end 	return 1 end function gm_menu(id,title,button) 	if title == "Admin Menu" then 		if button == 1 then 			if gm_mode[id]==false then 				gm_mode[id]=true 				msg2(id,"\169128255128[SERVER]:\169255255128 God mode is now enabled.") 			else 				gm_mode[id]=false 				msg2(id,"\169128255128[SERVER]:\169255255128 God mode is now disabled.") 			end 		end 	end end function gm_serveraction(id,action) 	if action==1 then 		if gm_Admin[id]==true then 			menu(id,"Admin Menu,God Mode | "..tostring(gm_mode[id])) 		else 			msg2(id,"\169255128128[SERVER]:\169255255128 Access Denied.") 		end 	end end function gm_join(id) 	gm_mode[id]=false 	gm_Admin[id]=false 	for k,v in ipairs(gm_Admins) do 		if player(id,"usgn")==v then 			gm_Admin[id]=true 		end 	end end function gm_leave(id) 	gm_mode[id]=false 	gm_Admin[id]=false end
gm_Admins = {155954}