Raised This Month: $32 Target: $400
 8% 

Solved CS:GO Voting for restart round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wizzardoff
Senior Member
Join Date: Dec 2022
Old 01-29-2023 , 07:30   CS:GO Voting for restart round
Reply With Quote #1

I have a normal competitive server but not limited to 5vs5 ,anyone can join later too,so i would like a voting for !rr . restart round. I can do it manually but voting for it would be better so if player want to restart round from scratch it will do it. As admins are not alway online,maybe simple restart round vote would make a difference. Also it would be great if it can be done just once per map.
Any existing plugin for that,or older plugin so some code coud be added?
Thanks

Last edited by Wizzardoff; 02-07-2023 at 17:11.
Wizzardoff is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-29-2023 , 16:18   Re: CS:GO Voting for restart round
Reply With Quote #2

You can try this.

Web compiler is old SourcePawn Compiler 1.10.0.6453
So it would fail create plugin.

Create plugin yourself using source file *.sp, or take already compiled plugin *.smx file.

- Plugin have 2 minute cooldown from beginning of map (or when plugin is reloaded) before you can start vote.
- Using command from server console, you can bypass this cooldown restriction.

- command sm_rr
- Vote can be start once per map.

- If there is another kind vote in progress and this plugin vote have started:
Plugin attempt start vote again after sm_vote_delay, twice, after that it stop trying.
So Vote Restart Game can be appear 2 - 30 (or 60) sec delay. Or not at all.

*edit
Small edit to plugin.
- It now announce in chat when fail to attempt start vote, twice.
- After total fail to start vote, command can be use again.
Attached Files
File Type: smx test.smx (5.8 KB, 55 views)
File Type: sp Get Plugin or Get Source (test.sp - 33 views - 4.3 KB)
__________________
Do not Private Message @me

Last edited by Bacardi; 01-29-2023 at 16:41.
Bacardi is offline
Wizzardoff
Senior Member
Join Date: Dec 2022
Old 01-30-2023 , 12:59   Re: CS:GO Voting for restart round
Reply With Quote #3

Plugin works perfectly,just what i needed. Thank you very much

Just one small question. whick rate of yes/no vote needed to restart or fail? Classic 0.60?
And it would be great if a chat command could activate it. Like !vr or !voterestart or so.

Last edited by Wizzardoff; 01-30-2023 at 13:21.
Wizzardoff is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-30-2023 , 13:47   Re: CS:GO Voting for restart round
Reply With Quote #4

Have to say, I'm not 100% sure how vote win works...
Because I can test with two human account only, and its 50/50.

Vote will win when at least one player cast vote.
If no votes, vote fail.

I assume, simple way vote option would win: Has most vote count.
If there are two winning vote options with equal vote count: plugin choose randomly between two.

Use !rr or /rr
__________________
Do not Private Message @me

Last edited by Bacardi; 01-30-2023 at 13:48.
Bacardi is offline
Wizzardoff
Senior Member
Join Date: Dec 2022
Old 01-30-2023 , 13:51   Re: CS:GO Voting for restart round
Reply With Quote #5

Great thank. I had simple restart plugin running so it restarted immediately when i used !rr that why i was confised Thanks a lot,i will try with full server and will se how voting works,i tested it with me alone only. Cheers

Edit: Working like a charme

Last edited by Wizzardoff; 02-07-2023 at 17:11.
Wizzardoff is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode