Raised This Month: $51 Target: $400
 12% 

[TF2] Class Time Limit


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Erreur 500
Senior Member
Join Date: Aug 2012
Location: Paris, France
Plugin ID:
3163
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Limit each class by time !
    Old 08-15-2012 , 17:41   [TF2] Class Time Limit
    Reply With Quote #1

    Class Time Limit



    Description

    Chose the time for player can play each class in each team, and select how much time he must wait for replay this class. You can also don't make timer on a class, or prohibit a class.
    Admins can have immuntity, you have just to select the flags and active the immunity CVAR.


    CVAR

    Code:
    ctl_enabled (default: 1) => Enable or disable class time limit ? ctl_flags (default: a) => Admin flags for no time limit
    ctl_immunity (default: 0) => Enable or disable admins being immune for class time limit ?
    ctl_red_scout (default: -1) => Timer for play red Scout in seconds, -1 for no limit, 0 for block class
    ctl_wait_red_scout (default: 500) => Timer to wait for replay red Scout in seconds, not need if Timer = -1 or 0
    ctl_red_soldier (default: -1)
    ctl_wait_red_soldier (default: 500)
    ctl_red_pyro (default: -1)
    ctl_wait_red_pyro (default: 500)
    ctl_red_demoman (default: -1)
    ctl_wait_red_demoman (default: 500)
    ctl_red_heavy (default: -1)
    ctl_wait_red_heavy (default: 500)
    ctl_red_medic (default: -1)
    ctl_wait_red_medic (default: 500)
    ctl_red_sniper (default: 500)
    ctl_wait_red_sniper (default: 1000)
    ctl_red_engineer (default: -1)
    ctl_wait_red_engineer (default: 500)
    ctl_red_spy (default: 0)
    ctl_wait_red_spy (default: 500)
    ctl_blue_scout (default: -1)
    ctl_wait_blue_scout (default: 500)
    ctl_blue_soldier (default: -1)
    ctl_wait_blue_soldier (default: 500)
    ctl_blue_pyro (default: -1)
    ctl_wait_blue_pyro (default: 500)
    ctl_blue_demoman (default: -1)
    ctl_wait_blue_demoman (default: 500)
    ctl_blue_heavy (default: -1)
    ctl_wait_blue_heavy (default: 500)
    ctl_blue_medic (default: -1)
    ctl_wait_blue_medic (default: 500)
    ctl_blue_sniper (default: 500)
    ctl_wait_blue_sniper (default: 1000)
    ctl_blue_engineer (default: -1)
    ctl_wait_blue_engineer (default: 500)
    ctl_blue_spy (default: 0)
    ctl_wait_blue_spy (default: 500)
    Installation

    Put class_time_limit.sp in the folder tf\addons\sourcemod\scripting
    Put class_time_limit.smx in the folder tf\addons\sourcemod\plugins
    Put Class_Time_Limit.cfg in the folder tf\cfg\sourcemod

    You need morecolors.inc

    And change the CVAR to you =) .

    Details

    If Class timer = 0 : player can't go to this class and he will have this message "This class is blocked, please chose an other class!", and class menu will open

    If Class timer = value > 1 : player will have this message for timeleft 30 sec and timeleft < 10 sec "Time left for play this class is %d second(s) !"
    Went the class timer is end, class menu will open. Then, if player is on an other class or team, timer to wait will continu.


    If Class timer = -1 : They don't have timer on this class.




    CRASH REPPORT : For now, DON'T TOUCH PYRO CVARS, Client game will be crash if time limit for pyro is active. I don't know where is the probleme, if anyone can help ? =s


    Sorry for my bad english =(

    ENJOY =D
    Attached Files
    File Type: sp Get Plugin or Get Source (class_time_limit.sp - 307 views - 65.1 KB)
    File Type: smx class_time_limit.smx (22.7 KB, 251 views)
    File Type: cfg Class_Time_Limit.cfg (5.0 KB, 262 views)

    Last edited by Erreur 500; 08-15-2012 at 17:42.
    Erreur 500 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 08-15-2012 , 21:49   Re: [TF2] Class Time Limit
    Reply With Quote #2

    Neat.
    Mitchell is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 08-16-2012 , 10:26   Re: [TF2] Class Time Limit
    Reply With Quote #3

    If possible, you should combine this with a class limiter.

    Say for instance you have a map 30 minutes, a engy constantly has the engineer spot. Nothing wrong with that as long as nobody else wants to have a go at it. If you add something that if player xx tries to become the engy, then the longest engineer gets a bumb and needs to select another class.

    That way you would give other people a chance to be engineer for instance, without having to loose all your engineers.

    (imagine having 3 engineers on a map, and then they all hit the timer of 500 seconds and nobody else wants to play engineers = no engineers anymore)
    __________________
    Arguing with a fool only proves there are two
    snelvuur is offline
    Erreur 500
    Senior Member
    Join Date: Aug 2012
    Location: Paris, France
    Old 08-16-2012 , 12:19   Re: [TF2] Class Time Limit
    Reply With Quote #4

    oh yes, it's a good idea.
    I will try to combine this with a class limiter like you say =)

    Thank you

    Last edited by Erreur 500; 08-16-2012 at 12:20.
    Erreur 500 is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 08-16-2012 , 12:29   Re: [TF2] Class Time Limit
    Reply With Quote #5

    p.s. there are class limiters already out there though, so dont reinvent the wheel. See http://forums.alliedmods.net/showthread.php?t=62630 for instance.
    __________________
    Arguing with a fool only proves there are two
    snelvuur is offline
    hleV
    Veteran Member
    Join Date: Mar 2007
    Location: Lithuania
    Old 08-16-2012 , 12:36   Re: [TF2] Class Time Limit
    Reply With Quote #6

    You're initializing global arrays incorrectly.
    Code:
    new array[size] = value;

    Code:
    new array[size] = {value, ...};
    hleV is offline
    Newbie1992
    Senior Member
    Join Date: Jan 2013
    Location: Germany
    Old 12-16-2013 , 08:13   Re: [TF2] Class Time Limit
    Reply With Quote #7

    Plugin works fine but can you fix the pyro cvars? Would be awesome!

    Thanks!
    __________________
    Newbie1992 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 10:39.


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