Raised This Month: $319 Target: $400
 79%   Almost there!

[CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
KoNLiG
Junior Member
Join Date: Sep 2020
Location: Israel
Plugin ID:
7753
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Exposes the functionality of the internal CS:GO vote panels.
    Old 08-09-2021 , 08:22   [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #1

    Custom Votes

    Description:
    This plugin exposes the functionality of the internal CS:GO vote panels.




    Features:

    Quote:
    • Customizable vote question text. (HTML supported)
    • Customizable pass text. (HTML supported)
    • Customizable panel icons.
    • Custom votes can be canceled at any time and moment.
    • Full control over player voting.
    • Ability of blocking & modifying votes.
    • Broadcast custom votes to any group of player you want.
    Installation:

    Quote:
    1. Place 'customvotes.smx' in '/csgo/addons/sourcemod/plugins/'.
    2. Load the plugin via the command line 'sm plugins load customvotes', map change or server restart.
    3. Done!
    ConVars:
    Code:
    // Sound file path that will be played once a client has voted no.
    // -
    // Default: "sound/ui/menu_invalid.wav"
    custom_votes_negative_vote_sound "sound/ui/menu_invalid.wav"
    
    // Sound file path that will be played once a client has voted yes.
    // -
    // Default: "sound/ui/menu_accept.wav"
    custom_votes_positive_vote_sound "sound/ui/menu_accept.wav"
    API:
    Spoiler


    Change Log:
    Quote:
    9 August, 2021 [1.0]
    • Initial release.
    Quote:
    20 August, 2021 [2.0]
    • API Expansion, added define to broadcast vote forever and small patches.
    Quote:
    21 August, 2021 [2.2]
    • Additional patches related to the last release.
    Corrections, suggestions and improvements are welcome!

    To compile you have to use 1.10+ SourceMod compiler.

    GitHub Repository
    Latest Release
    __________________
    For questions/plugin requests contact me:

    • Discord: KoNLiG#6417
    • Steam: KoNLiG

    Last edited by KoNLiG; 08-21-2021 at 03:08.
    KoNLiG is offline
    KoNLiG
    Junior Member
    Join Date: Sep 2020
    Location: Israel
    Old 08-09-2021 , 08:24   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #2

    Code for the main thread example image:
    PHP Code:
    public void OnPluginStart()
    {
        
    RegConsoleCmd("sm_customvote"Command_CustomVote);
    }

    Action Command_CustomVote(int clientint args)
    {
        if (
    CustomVotes_IsVoteInProgress())
        {
            return 
    Plugin_Handled;
        }
        
        
    CustomVoteSetup setup;
        
        
    setup.team CS_TEAM_NONE;
        
    setup.initiator client;
        
    setup.issue_id VOTE_ISSUE_UNPAUSEMATCH;
        
    setup.dispstr "<font color='#FF5500' class='fontSize-xxxl'>Faceit?</font><br/><img src='https://pbs.twimg.com/profile_images/1349712390628270081/KpMEtOII.png'/>";
        
    setup.disppass "<font color='#3df218'>Vote Passed!</font>";
        
        
    CustomVotes_Execute(setup10);
        
        return 
    Plugin_Handled;

    __________________
    For questions/plugin requests contact me:

    • Discord: KoNLiG#6417
    • Steam: KoNLiG

    Last edited by KoNLiG; 08-09-2021 at 08:31. Reason: Code mistake
    KoNLiG is offline
    Sarrus
    Member
    Join Date: May 2020
    Location: France
    Old 08-09-2021 , 09:59   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #3

    Looks really good!
    __________________
    Discord Coding Server | Steam Profile | Community Website | Github Profile

    Taking paid requests (add me on Discord)
    Sarrus is offline
    Cruze
    Veteran Member
    Join Date: May 2017
    Old 08-09-2021 , 12:05   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #4

    Damn, tested it and looks really good in-game! Thanks for sharing

    Edit:
    It would be really nice if you can add (if it's possible that is):

    setup.Display = client;

    instead of specific whole team because sometimes you may wanna display vote to a specific client only.
    __________________
    Taking paid private requests! Add me on steam/discord!
    AlliedModders Releases | Github | Private Plugins | PayPal | Steam | My Discord Server

    Last edited by Cruze; 08-09-2021 at 12:22. Reason: edit part
    Cruze is offline
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 08-09-2021 , 13:43   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #5

    Amazing. Good job!
    __________________
    NanoC is offline
    Send a message via Skype™ to NanoC
    KoNLiG
    Junior Member
    Join Date: Sep 2020
    Location: Israel
    Old 08-10-2021 , 05:18   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #6

    Thanks for the appreciation!

    Quote:
    Originally Posted by Cruze View Post
    Damn, tested it and looks really good in-game! Thanks for sharing

    Edit:
    It would be really nice if you can add (if it's possible that is):

    setup.Display = client;

    instead of specific whole team because sometimes you may wanna display vote to a specific client only.
    This is possible by adding 'CustomVotes_ExecuteToClient' native to broadcast a custom vote for a single player, but it's not ideal for the reason that there is only one 'vote_controller' entity exists, which means that it's not possible to broadcast several custom votes at once.
    This disadvantage can easily interrupt other plugins when broadcasting a custom vote to a single player.

    If there will be a demand for this native, it'll be added.
    __________________
    For questions/plugin requests contact me:

    • Discord: KoNLiG#6417
    • Steam: KoNLiG
    KoNLiG is offline
    digin
    Member
    Join Date: Nov 2019
    Old 08-10-2021 , 07:42   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #7

    wow nice plugins!
    digin is offline
    NanoC
    Veteran Member
    Join Date: Jan 2016
    Location: Argentina
    Old 08-10-2021 , 11:52   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #8

    Would be possible that admins can make a custom vote using a simple command? Like !vote from sourcemod votes
    __________________
    NanoC is offline
    Send a message via Skype™ to NanoC
    KoNLiG
    Junior Member
    Join Date: Sep 2020
    Location: Israel
    Old 08-10-2021 , 14:00   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #9

    Quote:
    Originally Posted by NanoC View Post
    Would be possible that admins can make a custom vote using a simple command? Like !vote from sourcemod votes
    Of course, it's possible to replicate SourceMod vote commands (!customvote, !cancelcustomvote), but it's not possible to create a multiple choice vote because the game only supports Yes/No votes.
    __________________
    For questions/plugin requests contact me:

    • Discord: KoNLiG#6417
    • Steam: KoNLiG
    KoNLiG is offline
    kratoss1812
    Senior Member
    Join Date: May 2018
    Location: Romβnia
    Old 08-10-2021 , 16:08   Re: [CS:GO] Custom Votes [Panorama] (v1.0 | 9 August 2021)
    Reply With Quote #10

    Really really cool Can you control to who the vote is beeing displayed or it is just for everyone?
    __________________
    kratoss1812 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 06:26.


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