[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
#2

Nobody has any comments, suggestions, ANYTHING on this?
Reply
#3

Yes, I have a comment: Please stop double posting.
Reply
#4

it's good if you post a pic of this fs...
Reply
#5

Quote:
Originally Posted by suhrab_mujeeb
View Post
Yes, I have a comment: Please stop double posting.
Post date: 2/08/2012
"bump" date: 2/13/2012

You're allowed to bump (48?) hours after you've posted. I spent valuable time on this script, so I'd like to see it used / get feedback on it. Kindly go back into your hole, I'm not breaking any rules here.

Quote:
Originally Posted by Sufyan
View Post
it's good if you post a pic of this fs...
Pictures of what? Commands?
Reply
#6

Quote:
Originally Posted by 2KY
View Post
Post date: 2/08/2012
"bump" date: 2/13/2012

You're allowed to bump (48?) hours after you've posted. I spent valuable time on this script, so I'd like to see it used / get feedback on it. Kindly go back into your hole, I'm not breaking any rules here.



Pictures of what? Commands?
is not dialog and textdraw base? if its not then make Dialog and Textdraw based fs then you get comments :P
Reply
#7

I really like the system + code, but you don't bump topics on the FS and GM section because there are tons of scripts that would be bumped every second day thus, making more spam + more bumps.
Reply
#8

I really like it, I will use it.
Reply
#9

Thank you.
Reply
#10

nice, please a pic :3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)