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

[TF2] Vote Respawn Times


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DR.DVD
New Member
Join Date: Jun 2016
Location: Spain
Plugin ID:
5264
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allow players to vote whether to enable/disable default respawn times.
    Old 06-28-2016 , 11:45   [TF2] Vote Respawn Times
    Reply With Quote #1

    Description

    Allow players to vote whether to enable/disable default respawn times.

    This plugins works around "mp_disable_respawn_times". Players can initiate a vote typing !voterespawn (also /voterespawn) in the chat to change the current value.
    If enough people vote "Yes", the value will change. If not, well, guess what happens... XD

    There is a cooldown between each vote, so people cant' spam it, but you can manage the cooldown time using a cvar.

    This plugin uses NativeVotes, by Powerlord. If you don't have NativeVotes installed, you should still be able to use the plugin, using the "classic" voting interface that SourceMod has.


    CVars
    • sm_voterespawn_cooldown - Sets the cooldown time, in seconds, before another vote can take place. (Default: 300).

    To Do
    • Make the "sm_voterespawn_enabled" cvar work, so you can enable/disable the plugin on the fly.
    • Add a cvar to decide which minimum percentage of votes you need for the vote to pass.


    The plugin also has translation files, currently, just English and Spanish.


    This is my first plugin from scratch. I took inspiration from code by Powerlord (NativeVotes) and Seb3pg (TF2 Vote Scramble).
    I'm aware that the code may have some mistakes and it may not be the most optimal, so feel free to criticize, but in a constructive way, please.
    Attached Files
    File Type: sp Get Plugin or Get Source (VoteRespawn.sp - 247 views - 7.9 KB)
    File Type: smx VoteRespawn.smx (9.5 KB, 352 views)
    File Type: txt voterespawn.phrases.txt (2.0 KB, 329 views)
    __________________
    I usually play Team Fortress 2, and my biggest passion is Rebel Gamers Clan. I also like Half-Life 2, Super Smash Bros. and Toy Story.


    Last edited by DR.DVD; 06-28-2016 at 11:49.
    DR.DVD is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 07-18-2016 , 12:22   Re: [TF2] Vote Respawn Times
    Reply With Quote #2

    Half of the plugin is using Transitional Syntax and half of it isnt...
    __________________
    luki1412 is offline
    DR.DVD
    New Member
    Join Date: Jun 2016
    Location: Spain
    Old 08-05-2016 , 09:50   Re: [TF2] Vote Respawn Times
    Reply With Quote #3

    Quote:
    Originally Posted by luki1412 View Post
    Half of the plugin is using Transitional Syntax and half of it isnt...
    Yes, you are right. Since this is my first plugin from scratch, I still don't fully know how to use transitional syntax nor the old one.
    Sorry about that...
    I'll try to rewrite the code into Transitional Syntax when I have some more free time.
    __________________
    I usually play Team Fortress 2, and my biggest passion is Rebel Gamers Clan. I also like Half-Life 2, Super Smash Bros. and Toy Story.

    DR.DVD is offline
    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 05:42.


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