08.02.2012, 01:57
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.
*/
After you edit the reason, go down to OnDialogResponse and find
pawn Code:
switch( listitem )
{
case 0:
{
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.
*/
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.
*/
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.
*/
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!