Raised This Month: $ Target: $400
 0% 

Client Initialized Voting -Alltalk


Post New Thread Reply   
 
Thread Tools Display Modes
Author
lazylizard
Junior Member
Join Date: Mar 2017
Plugin ID:
5576
Plugin Version:
1.7
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows client to start a alltalk vote using !alltalk
    Old 03-27-2017 , 06:59   Client Initialized Voting -Alltalk
    Reply With Quote #1

    Hello

    Client Initialized Voting -Alltalk. Allows client to start a alltalk vote using !alltalk in chat

    //Change the following to limit the number of time this kind of vote is called
    #define maxVote 3
    so in this case you can call !alltalk over the round 3 times before all voting stops till next mapc hange

    Also vote will run for 18 seconds.

    Ester egg... joke when voting starts
    Attached Files
    File Type: sp Get Plugin or Get Source (Client Initialized Voting -Alltalk.sp - 1074 views - 1.7 KB)

    Last edited by asherkin; 06-25-2021 at 16:08.
    lazylizard is offline
    BorealBlizzard
    Junior Member
    Join Date: Jun 2021
    Location: Missouri, MO
    Old 06-12-2021 , 22:27   Re: Client Initialized Voting -Alltalk
    Reply With Quote #2

    any way to make it to you can vote to turn it off?
    __________________
    BorealBlizzard is offline
    L4D2Noob
    AlliedModders Donor
    Join Date: Mar 2020
    Location: Moscow
    Old 08-22-2022 , 01:29   Re: Client Initialized Voting -Alltalk
    Reply With Quote #3

    Code:
    L 08/21/2022 - 16:36:45: SourceMod error session started
    L 08/21/2022 - 16:36:45: Info (map "cs_cs16_assault") (file "/game/cstrike/addons/sourcemod/logs/errors_20220821.log")
    L 08/21/2022 - 16:36:45: [SM] Exception reported: A vote is already in progress
    L 08/21/2022 - 16:36:45: [SM] Blaming: voteAlltalk.smx
    L 08/21/2022 - 16:36:45: [SM] Call stack trace:
    L 08/21/2022 - 16:36:45: [SM]   [0] VoteMenu
    L 08/21/2022 - 16:36:45: [SM]   [1] Line 799, /groups/sourcemod/compiler-1.8/include/menus.inc::VoteMenuToAll
    L 08/21/2022 - 16:36:45: [SM]   [2] Line 70, /home/forums/content/files/2/7/8/4/5/1/161715.attach::OnClientSayCommand
    L 08/21/2022 - 16:52:10: Error log file session closed.
    __________________
    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 08-22-2022 , 05:10   Re: Client Initialized Voting -Alltalk
    Reply With Quote #4

    Quote:
    Originally Posted by L4D2Noob View Post
    Code:
    L 08/21/2022 - 16:36:45: SourceMod error session started
    L 08/21/2022 - 16:36:45: Info (map "cs_cs16_assault") (file "/game/cstrike/addons/sourcemod/logs/errors_20220821.log")
    L 08/21/2022 - 16:36:45: [SM] Exception reported: A vote is already in progress
    L 08/21/2022 - 16:36:45: [SM] Blaming: voteAlltalk.smx
    L 08/21/2022 - 16:36:45: [SM] Call stack trace:
    L 08/21/2022 - 16:36:45: [SM]   [0] VoteMenu
    L 08/21/2022 - 16:36:45: [SM]   [1] Line 799, /groups/sourcemod/compiler-1.8/include/menus.inc::VoteMenuToAll
    L 08/21/2022 - 16:36:45: [SM]   [2] Line 70, /home/forums/content/files/2/7/8/4/5/1/161715.attach::OnClientSayCommand
    L 08/21/2022 - 16:52:10: Error log file session closed.
    PHP Code:
    //public Action OnClientSayCommand(int client, const char[] command, const char[] sArgs)
    public void OnClientSayCommand_Post(int client, const char[] command, const char[] sArgs)
    {

        if (
    client && StrEqual(sArgs"!alltalk\0"false))
        {

            if (
    voteTimes >= maxVote)
            {
                
    PrintToChat(client"\x04[Vote-AllTalk]\x03 There was already an AllTalk vote.");
                return;
            }

            if (!
    IsNewVoteAllowed())
            {
                
    PrintToChat(client"\x04[Vote-AllTalk]\x03 Vote in progress or cooldown is active.");
                return;
            }



            
    ShowActivity2(client"[SM] ""Initiated Vote alltalk");
            
    LogAction(client, -1"\"%L\" used vote-alltalk"client);
            new 
    Handle:menu CreateMenu(Handle_VoteMenu);
            
    SetMenuTitle(menu"Turn on all Talk so you can hear my jokes?");
            
    AddMenuItem(menu"notsure1""Yes");
            
    AddMenuItem(menu"notsure2""No");
            
    SetMenuExitButton(menufalse);
            
    VoteMenuToAll(menu18);

            return;


        }

    __________________
    Do not Private Message @me
    Bacardi is offline
    L4D2Noob
    AlliedModders Donor
    Join Date: Mar 2020
    Location: Moscow
    Old 08-22-2022 , 07:24   Re: Client Initialized Voting -Alltalk
    Reply With Quote #5

    As always, thanks!
    The question is, is there a typo or is it necessary?
    Quote:
    Originally Posted by Bacardi View Post
    PHP Code:
    if (client && StrEqual(sArgs"!alltalk\0"false)) 
    !alltalk\0?
    __________________
    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 08-22-2022 , 12:29   Re: Client Initialized Voting -Alltalk
    Reply With Quote #6

    Quote:
    Originally Posted by L4D2Noob View Post
    As always, thanks!
    The question is, is there a typo or is it necessary?

    !alltalk\0?
    Yeah, StrEqual not need look null terminate \0
    I was just testing.
    __________________
    Do not Private Message @me
    Bacardi is offline
    L4D2Noob
    AlliedModders Donor
    Join Date: Mar 2020
    Location: Moscow
    Old 08-23-2022 , 14:29   Re: Client Initialized Voting -Alltalk
    Reply With Quote #7

    Thanks Bacardi for your help.

    For the lazy ones :-)
    Attached Files
    File Type: sp Get Plugin or Get Source (Alltalk.sp - 136 views - 1.7 KB)
    __________________
    L4D2Noob is offline
    Send a message via ICQ to L4D2Noob Send a message via Skype™ to L4D2Noob
    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 05:03.


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