Forum
Scripts
How to make auto vip??
How to make auto vip??
9 replies
1

Talented Doge: but i dont know codes 2. Check all players, check if a player isn't a spectator.
3. If so then every minute(or second if you want) it will add +1 to the variable in step 1
4. If the variable is equal to 1 Day(1440 minutes) then
5. The player gets VIP
Louie: Whrite code please Can't you write it yourself? I already gave you info on how to do it, writing it should be easy enough
Search it,
I have given a way in it.
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
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
timeplayed = {}
for _, hook in ipairs({"join", "minute",}) do
	addhook(hook, hook .. "hook")
end
function joinhook(id)
	local usgn = player(id, "usgn")
	
	if (usgn > 0 --[[and <your code to check if the player is not a V.I.P.>]]) then
		timeplayed[usgn] = timeplayed[usgn] or 0
	end
end
function minutehook()
	for _, id in ipairs(player(0, "tableliving")) do
		local usgn = player(id, "usgn")
		
		if (timeplayed[usgn]) then
			timeplayed[usgn] = timeplayed[usgn] + 1
			
			if (timeplayed[usgn] >= 1440) then
				timeplayed[usgn] = nil
				
				-- <your V.I.P. code here>
			end
		end
	end
end
1

Offline