Automatic round ender

Release your plugins here!
cssbestrpg
Senior Member
Posts: 192
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Automatic round ender

Postby cssbestrpg » Mon Jul 19, 2021 8:27 am

Hello, guys this a plugin that ends round when round time limit is ended
Only tested in css
https://github.com/srpg/round-end/tree/main
rautamiekka
Junior Member
Posts: 11
Joined: Mon Feb 15, 2016 6:53 pm
Location: Ulvila, Finland
Contact:

Re: Automatic round ender

Postby rautamiekka » Sat Aug 28, 2021 3:29 pm

Could these lines

Syntax: Select all

ftime = cvar.find_var('mp_freezetime').get_int()
rtime = cvar.find_var('mp_roundtime').get_int()
rtime = float(rtime * 60.0)
rtime = float(rtime + ftime)
rtime += 5
be replaced by these instead ?

Syntax: Select all

ftime = cvar.find_var('mp_freezetime').get_float()
rtime = cvar.find_var('mp_roundtime').get_float() * 60.0 + ftime + 5.0

Sorry about the indentation, phpBB destroyed it, so I removed it altogether.
cssbestrpg
Senior Member
Posts: 192
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: Automatic round ender

Postby cssbestrpg » Sat Aug 28, 2021 3:32 pm

rautamiekka wrote:Could these lines

Syntax: Select all

ftime = cvar.find_var('mp_freezetime').get_int()
rtime = cvar.find_var('mp_roundtime').get_int()
rtime = float(rtime * 60.0)
rtime = float(rtime + ftime)
rtime += 5
be replaced by these instead ?

Syntax: Select all

ftime = cvar.find_var('mp_freezetime').get_float()
rtime = cvar.find_var('mp_roundtime').get_float() * 60.0 + ftime + 5.0

Sorry about the indentation, phpBB destroyed it, so I removed it altogether.


Edit:

Just did test it works that way too
rautamiekka
Junior Member
Posts: 11
Joined: Mon Feb 15, 2016 6:53 pm
Location: Ulvila, Finland
Contact:

Re: Automatic round ender

Postby rautamiekka » Sat Aug 28, 2021 3:47 pm

Technically the

Code: Select all

.0
parts aren't necessary anymore, but I added them for clarity.
cssbestrpg
Senior Member
Posts: 192
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: Automatic round ender

Postby cssbestrpg » Sat Aug 28, 2021 3:51 pm

Correct me if i am wrong, so those .0 aren't need because the first value is from float right?
rautamiekka
Junior Member
Posts: 11
Joined: Mon Feb 15, 2016 6:53 pm
Location: Ulvila, Finland
Contact:

Re: Automatic round ender

Postby rautamiekka » Sat Aug 28, 2021 4:02 pm

Doesn't seem to matter whether it's float+int or int+float. Direct copypaste from ConEmu:

Syntax: Select all

Microsoft Windows [Version 10.0.19043.1165]

user@RAUTALAPTOP2 C:\
$ python
Python 3.9.6 (default, Jul 30 2021, 11:42:22) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

>>> 10.0+5
15.0
>>> 5+10.0
15.0

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 1 guest