Server Name: ZARP BHop
Suggestion Title: RTV Timer
How would it benefit the server: Allow players to have more time to complete maps
Potential Issues/Exploits: None
Additional notes: This has been used by me for months and has been shared by me with Facepunch so others can make use of this functionality.
Just add the following variable to the top of the modules/sv_rtv.lua file and replace the first line of the RTV:Vote function in the same file. Following that, you will just need to add the last code snippet to the core_lang.lua file // This does work for both Surf and BHop modes.
VariablesRTV.VoteTime = 15 * 60
RTV.VotePossibleTime = RTV.MapInit + RTV.VoteTime
Function if CurTime() <= ( RTV.VotePossibleTime ) then
local t,s = math.Round( ( RTV.VotePossibleTime - CurTime() ) / 60 ), "minutes"
if t < 1 then t,s = math.Round( RTV.VotePossibleTime - CurTime() ), "seconds" end
if t == 1 then s = "second" end
return Core:Send( ply, "Print", { "Notification", Lang:Get( "VoteNotPossible", { t .. " " .. s } ) } )
elseif ply.RTVLimit and CurTime() - ply.RTVLimit < 60 then
Notification (core_lang.lua)Lang.VoteNotPossible = "Voting is not possible in this period (Please wait 1;)"
Link to Pastebin with comments added to explain what things are:
pastebin.com/twYhbUdt