Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modules/sv_rtv.lua
- ---------------------------------------VARIABLES(Place in the second variable set)---------------------------------------------------
- RTV.VoteTime = 5 * 60 --5 is the amount of time in minutes until RTV can be used
- RTV.VotePossibleTime = RTV.MapInit + RTV.VoteTime --This will calculate when the vote can be used based on RTV.MapInit plus the RTV.VoteTime value
- -------------------------------------------FUNCTION------------------------------------------------------------------------------------
- --Replace the first line of the RTV:Vote function with this whole bit here--
- if CurTime() <= ( RTV.VotePossibleTime ) then --Checks if the current time is less than or equal to the RTV set time
- local t,s = math.Round( ( RTV.VotePossibleTime - CurTime() ) / 60 ), "minutes" --Rounding values to display minutes left in chat
- if t < 1 then t,s = math.Round( RTV.VotePossibleTime - CurTime() ), "seconds" end --If under a minute, this finds the seconds
- if t == 1 then s = "second" end --Because I had a problem with the chat saying '1 seconds' instead of '1 second'
- return Core:Send( ply, "Print", { "Notification", Lang:Get( "VoteNotPossible", { t .. " " .. s } ) } ) --Display RTV notification
- elseif ply.RTVLimit and CurTime() - ply.RTVLimit < 60 then
- core_lang.lua
- --------------------------------------------NOTIFICATION--------------------------------------------------------------------------------
- Lang.VoteNotPossible = "Voting is not possible in this period (Please wait 1;)"
Advertisement
Add Comment
Please, Sign In to add comment