[FilterScript] 2K-Vote : Votekicking System!
#1

2K-VOTE


Introduction

2K-VOTE is the second released in a series of releases on the SA:MP forums! This filterscript adds the ability to votekick players for pre-defined reasons. 2K-VOTE comes pre-compiled with ZCMD, and sscanf 2.5. If you're having issues getting the filterscript to work correctly, then it's probably an issue regarding your includes, or plugins. Please make sure they are in the correct directory before posting below with problems.

Downloads

Pastebin
* This is not recommended, and you are more likely to have problems with includes/plugins not working correctly. Indentation is also messed up due to the way Pastebin recognizes tab-spaces.

SendSpace ("FULL" PACKAGE)
* This is recommended due to the fact that you are less likely to receive unwanted warnings/errors using the EXACT set up I have provided for you.

Editing the Filterscript

Along with all of my other releases, this filterscript comes with a number of customizable options easily accessible by new scripters, and server owners. You don't need a Harvard degree in order to understand how to edit this.

Modifying the votekick reasons:

Find
pawn Code:
#define     DIALOG_TEXT_REASONS     "Use of Cheats\nFlaming\nSpawn Killing"
            /*
                Edit this string with your available reasons to kick a player.
                Put \n between reasons.
                Example: Cheating\nFlaming would display:       Cheating
                                                                Flaming
                                                               
                After editing this, go down to OnDialogResponse, and add a new 'case' for it.
            */
Edit the words in the quotations. Use \n to indicate a new line on the dialog. I'm not quite sure how many lines the dialog will support, so I'll be safe and assume around 255, although the number could be much larger.

After you edit the reason, go down to OnDialogResponse and find
pawn Code:
switch( listitem )
{
    case 0:
    {
and start adding upon the 'cases'. Case 0 would be line 1, et cetera.

Avoiding conflicting dialog IDs:

In order to prevent conflicting dialog IDs, I have added a define up top of the script that determines the STARTING Dialog ID. This filterscript uses two (2) dialogs, meaning if you define this as 1000, it will use dialog ID 1000, and 1001.

Find
pawn Code:
#define     DIALOG_VOTEKICK         1000
            /*
                Edit this number to your preferred dialog ID,
                This is easily editable in order to prevent confrontations (issues) with your gamemode.
            */
Edit this number to your STARTING dialog ID.

Changing the amount of time it takes to kick somebody:

Find
pawn Code:
#define     VOTEKICK_TIME           30
            /*
                Edit this number to your preferred vote-kick time.
                This number is in seconds, therefore a 30 here would mean it would take 30 seconds before a vote is made.
            */
Edit 30 to the number of seconds (yes, this is actual seconds; meaning "30" would equal 30 seconds.)

Changing the Cool-down time:

Find
pawn Code:
#define     VOTEKICK_COOLDOWN       5*60000
            /*
                Edit this number to your preferred vote-kick cooldown time.
                After someone is voted, this timer will start and prevent other users from votekicking them until it resets the variable.
                By default, this cooldown is on 5 minutes.
            */
Edit 5*60000 to the amount you would like in milliseconds! 1,000 milliseconds = 1 second, 60,000 milliseconds = 1 minute.

And that's it!

If you like this filterscript, please feel free to leave comments below, or +rep me! All comments are appreciated, and I hope you enjoy this addition to the 2K library!
Reply


Messages In This Thread
2K-Vote : Votekicking System! - by 2KY - 08.02.2012, 01:57
Re: 2K-Vote : Votekicking System! - by 2KY - 14.02.2012, 02:38
Re: 2K-Vote : Votekicking System! - by suhrab_mujeeb - 14.02.2012, 03:01
Re: 2K-Vote : Votekicking System! - by Sufyan - 14.02.2012, 03:11
Re: 2K-Vote : Votekicking System! - by 2KY - 14.02.2012, 03:18
Re: 2K-Vote : Votekicking System! - by Sufyan - 14.02.2012, 03:21
Re: 2K-Vote : Votekicking System! - by suhrab_mujeeb - 14.02.2012, 04:14
Re: 2K-Vote : Votekicking System! - by MA_proking - 27.02.2012, 12:37
Re: 2K-Vote : Votekicking System! - by 2KY - 16.05.2012, 00:46
Respuesta: 2K-Vote : Votekicking System! - by Cacoby - 16.05.2012, 01:47

Forum Jump:


Users browsing this thread: 2 Guest(s)