please help me.
2hours = vip
giving code and thx all
Scripts
2 hours = Vip
2 hours = Vip
1

p = {}
addhook("team","_t")
function _t(id,t)
	if not p[id] then p[id]=0 end
end
addhook("minute","_m")
function _m()
	for k, v in pairs (player(0,"table")) do
		p[v] = p[v] + 1
		if p[v] == 120 then
			-- give vip here
		end
	end
end
addhook("leave","_l")
function _l(id)
	if p[id] then p[id] = nil end
end
Rainoth: There will be an error at line 4 because after the condition you don't assign any value to p[id].
Rainoth: Fixed.function _t(id,t) 	if not p[id] then p[id] = 0 end end
Rainoth's.p = {}
addhook("team","_t")
function _t(id,t)
	p[id] = p[id] or 0
end
addhook("minute","_m")
function _m()
	for k, v in ipairs (player(0,"table")) do
		p[v] = p[v] + 1
		if p[v] == 120 then
			-- give vip here
		end
	end
end
addhook("leave","_l")
function _l(id)
	p[id] = nil
end
p[id] = (p[id] or 0)
Dousea:
Rainoth: VIP = {}
function VIPsay(id, text)
for _,i in ipairs(VIP) do
if i == player(id, "usgn") then
msg("\169255255255"..player(id, "name").." [VIP]: "..text)
return 1
end
end
end
addhook("say","VIPsay")
Edit: Oopsie, I left return 1 forgotten which means it will lead to a bug - whenever you type something, the message will appear two times. I guess you wouldn't mind it, I fixed that issue nevertheless. Was bit in a hurry while typing the code.
GeoB99: you also forgot to make it work with the 2 hours thing
Mami Tomoe: No. He can simply put that code inside the
Rainoth's code, it wouldn't be such of a bother. I am pretty sure he knows how to.
1
