I hope u understand me .
Forum




timer random menu
4 replies



I hope u understand me .
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-- This function is to round number function math.round(number) 	return math.ceil(number - .5) end -- This function is your auto function function myautofunction() 	-- Your auto function code inside this function end -- This function is for your 1 hour timer function myfunction() 	-- To choose random player from 1 to 32 	local chosen = math.random(1, 32) 	 	-- If the chosen player exists because not always all players exists 	if (player(chosen, "exists")) then 		-- Send your menu to the chosen player 		menu(chosen, "content-here") -- Change "content-here" to your menu content 		 		-- Save the chosen player's position for your AFK check 		local x, y = player(chosen, "x"), player(chosen, "y") 		-- Timer for your AFK check 		local afktimer = 15 -- Change 15 to your desired time in seconds 		 		-- This function is for your AFK check timer 		function afkcheck() 			-- If the chosen player's position still the same with the previous position 			-- It means the chosen player is AFK 			if (math.round(player(chosen, "x")) == math.round(x) and math.round(player(chosen, "y")) == math.round(y)) then 				-- Call your auto function that do certain stuff 				myautofunction() 			end 			 			-- Create timer again for your 1 hour check 			timer(3600000, "myfunction") 		end 		 		-- Create timer for your AFK check 		timer(afktimer * 1000, "afkcheck") 	-- If the chosen player doesn't exist 	else 		-- Call this function again to get existing player 		myfunction() 	end end -- Create timer for your 1 hour check timer(3600000, "myfunction")
edited 1×, last 04.01.15 05:16:22 am

You said you have made some code and stuff and you are not able to copy& paste your code into the first function?
And what should he put in the menu? I mean... wasn´t it your idea of the menu?




