1
timer(time,unmute(pl))
This timer should have the time as "time" from this:
1
local time = tonumber(p[3])
And to send it to a function after the time is over...
(Some kind of a mute script)
timer(time,unmute(pl))
local time = tonumber(p[3])
timer(time,"unmute",pl)
elseif cmd == "!mute" then 				if rp_Adminlevel[id] >= 2 then 					local pl = tonumber(p[2]) 					local time = tonumber(p[3]) 					if pl ~= nil then 						if time ~= nil then 							if time <= 3600 then 								if player(pl,"exists") then 									if 	rp_mute[pl] == false then 									gmsg("255255000","[Server]: \169255000000"..player(id,"name").." has muted "..player(pl,"name").." for "..time.." seconds.") 									rp_mute[pl]=true 									timer(time,"unmute",pl) 									end 								end 							else 							gmsg2(id,"255255000","[Server]: \169255000000You can't enter more than 1 hour.") 							end 						else 						gmsg2(id,"255255000","[Server]: \169255000000You need to enter time.")	 						end 					end 				else 				gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.")	 				end
function unmute(pl) 	if pl ~= nil then 		if player(pl,"exists") then 			if 	rp_mute[pl] == true then 				gmsg("255255000","[Server]: \169000255000"..player(pl,"name").." is no longer muted.") 				rp_mute[pl]=false 			end 		end 	end end
time=time*10 timer(time,"unmute",pl)
time=time+time+time+time+time+time+time+time+time+time timer(time,"unmute",pl)
time2=time+time+time+time+time+time+time+time+time+time timer(time2,"unmute",pl)
seconds = 4 milliseconds = seconds * 1000
elseif cmd == "!vm" then 			local text = tostring(p[2]) 				if text ~= nil then 					if rp_Adminlevel[id]== 0 and rp_vip[id]== 1 then 						for pl = 1,32 do 							if rp_vip[pl]==1 and rp_Adminlevel[pl]==0 then 								if string.sub(txt, #txt-1,#txt) == "!vm" then 								txt = string.sub(txt, 1, #txt-2) 								msg2(id,"\169128128128VM | "..player(id,"name")..": "..txt) 								end 							end 						else 						gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.") 						end 					end 				end 			end
local text = "!vm Hello dude" -- If you want to get the first 3 characters you do it like this string.sub(text, 1, 3) -- Returns "!vm" as it starts from the 1st character (!) and ends on the 3rd character (m). -- So if you want to get the further text, string.sub(5, #text) -- Returns "Hello dude" as it starts from the 5th character (H) and ends on the last character (e) (in this case, the string length, that you can get by using #) -- Note that spaces also count as characters -- Another example: myVar = "Hello world" string.sub(myVar, 1, 5) -- Hello string.sub(myVar, 7, 11) -- world
elseif cmd == "!vm" then 				if rp_Adminlevel[id]<= 0 and rp_vip[id]>= 1 then 				local txt = tostring(p[2]) 					if txt ~= nil then 					txt = string.sub(txt, 1, 3) 						for pl = 1,32 do 							if rp_vip[pl]==1 and rp_Adminlevel[pl]==0 then 								if string.sub(txt, #txt-1,#txt) == "!vm" then 									msg2(id,"\169128128128VM | "..player(id,"name")..": "..txt) 								end 							end 						end 					end 				else 				gmsg2(id,"255255000","[Server]: \169255000000You don't have permission.") 				end
for _, i in pairs(player(0,'table')) do 	if rp_vip[i] == 1 then 		msg2(i,"\169128128128VM | "..player(id,"name")..": "..txt) 	end end
elseif cmd == "!vm" then 				for _, i in pairs(player(0,'table')) do 					if rp_Adminlevel[i]<= 0 and rp_vip[i]>= 1 then 					local txt = tostring(p[2]) 						if txt ~= nil then 						txt = string.sub(txt, 1, 3) 							for pl = 1,32 do 								if rp_vip[pl]==1 and rp_Adminlevel[pl]==0 then 									if string.sub(txt, #txt-1,#txt) == "!vm" then 										msg2(i,"\169128128128VM | "..player(i,"name")..": "..txt) 									end 								end 							end 						end 					else 					rp_msg2(i,"255255000","[Server]: \169255000000You don't have permission.") 					end 				end