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

Vote Mod (Version 4.6)


Post New Thread Reply   
 
Thread Tools Display Modes
amokossi
Senior Member
Join Date: Apr 2008
Old 10-24-2012 , 03:39   Re: Vote Mod (Version 4.6)
Reply With Quote #101

Hi Guys

I would like to implemet sounds.

For example my menu looks like this:

1. Gungame
2. Funweapons
3. Roll the dice

When the vote is over and the reound is restarted I would like to hear Gungame enabled or funweapons enabled or roll the dice enabled. Depending on which mod won. Precache of the sounds is working but I don't know how to differ which sound should be played on what result?

I just added the client_cmd at the end of the checkvotes. But this plays the sound on whatever mod won.
Hope you know what I need ;)

THX
Amokossi

Code:
public CheckVotes()
{
        new best = 9;
        new noVotes = 0;

        for(new a = 0; a < 9; a++)
        {
                if(count[a] > count[best])
                        best = a;
                else
                        noVotes++;
        }

        if(noVotes == 10)
                best = 9;

        if(best != 9)
        {
                client_print(0, print_chat, "%s won with %d votes", menuBody[best], count[best]);
                client_cmd(0,"mp3 play sound/misc/modsound.mp3") ;


                #if defined DEBUG
                server_print("%s won with %d votes", menuBody[best], count[best]);
                #endif
        }
        else if(best == 9)
        {
                client_print(0, print_chat, "%s won with %d votes", "No mod", count[best]);

                #if defined DEBUG
                server_print("%s won with %d votes", "No mod", count[best]);
                #endif
        }

        loaded = best;
        SetCvars(best);
}
amokossi is offline
Send a message via ICQ to amokossi Send a message via MSN to amokossi
vedant007
Member
Join Date: Jul 2013
Old 04-05-2014 , 07:45   Re: Vote Mod (Version 4.6)
Reply With Quote #102

Quote:
Originally Posted by Xanimos View Post
Might be better if you had an ini file that controled this....you have the text said in menu and the cvars to change.
Yeah Agree..
In my opinion prefix should be ".ini" in config folder

Last edited by vedant007; 04-05-2014 at 07:45.
vedant007 is offline
Send a message via Skype™ to vedant007
Reply



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 18:43.


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