voteban
1 Attachment(s)
As requested bij Switchie.
(request: http://forums.alliedmods.net/showthread.php?t=42127 ) This is my second plugin that i post here, so please shoot. When there are no admins on the server, players can say "/voteban" en start a vote to ban a player for a surtain time. The plugin is depending on the following cvars: amxx_voteban_delaytime Time between votes (defaults to 600 seconds) amxx_voteban_ratio Vote ratio (defaults to 0.50) amxx_voteban_minvoters Min voters/players who have to vote to let the vote count(defaults to 0.0) amxx_voteban_bf_ratio Back fire ratio for the vote starter :), if the for voters/ against voters is less then this, the vote starter is banned(defaults to 0.0) amxx_voteban_bantime Duration of the ban (defaults to 5 minutes) amxx_voteban_disable Disable the plugin An admin can start a vote any time, the delaytime is of no influence on this. EDIT: Changed "access(id,ADMIN_USER)" in "is_user_admin(id)" EDIT: As requested by neogeo: cvar amxx_voteban_ip Ban by ip instead of steam-id (defaults to 0) EDIT: As sugested by Suicid3, some changes. EDIT:(again)(and again) The cvar amxx_voteban_ip has changed into amxx_voteban_type. If this cvar is set to 0, the ban is made on the steam_id. If this cvar is set to 1, the ban is made on the ip address. If this cvar is set to 2, amxbans is triggered. |
Re: voteban
hi
can you add ban by ip ? thanks |
Re: voteban
This has already been made in the base amxmodx code.
|
Re: voteban
Quote:
I realy cracked my brain on this, before i decided to write this plugin. My objectives for this where: * Easy sellection by menu * "Normal" player access * When there is an admin, normal players are blocked from using it * votedelay byond mapchange * "Back fire" at the person wh started the vote It is as a respond to a request and for my personal use. At this moment it serves it purpes and it was a nice programming "training". Therfore it is not my intention to make any changes. |
Re: voteban
hi
can you add ban by ip ? thanks |
Re: voteban
Ooooh Yeah thx , nice work and thx :-)
Lets test this :p |
Re: voteban
Quote:
|
Re: voteban
thanks :D
|
Re: voteban
I have a few suggestions.
Here is an updated SayIt() function that uses suggestion #2, #3, and #4 PHP Code:
|
Re: voteban
Thanks for the suggestions.
Good advices thanks :D I'm only not sure What you mean about #2 of your list. The plugin is working with SysTimeOffset being a static So I have tested get_systime with the following script: Code:
#include <amxmodx> It simply returns the amount of seconds that have past since 00:00:00 01/01/1970 minus the offset (this is also what i understood from the documentation) You are right if you say make it a non static to avoid an overflow and change it every time the script is run.(or started) |
All times are GMT -4. The time now is 11:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.