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

[Dev + CS:S/GO+DoD:S] Teams Management Interface (Updated 1.2.3@invulbug)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Plugin ID:
2896
Plugin Version:
1.2.3
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Interface for managing teams (scrambling/swapping and switching players only at the moment)
    Old 04-10-2012 , 00:31   [Dev + CS:S/GO+DoD:S] Teams Management Interface (Updated 1.2.3@invulbug)
    Reply With Quote #1

    Teams Management Interface

    v. 1.2.3

    Forewords : I define Teams Management as the action of moving 1 or more players from one or both teams to another. All the ones initiated by this interface are either between round end and round start or instantly (tested under CS:S, CS:GO and DoD:S only).

    I made this interface partly because Sourcemod has lacked since a while of the option "transfer on round end" that MAP had.

    Also see 2nd post for a list of plugins using this interface plugin.

    Features :
    • Centralize different Teams Management requests from different plugins.
    • Provides Natives to request a Teams Management. For exemple : to scramble the teams or to move someone to a team; or even to prevent/cancel the ones made by other plugins, by overriding them by another usual request, or a cancel request.
    • Provides Forwards to inform plugins when a Teams Management is accepted, canceled or executed.
    • --------------------
    • Only one "global" Teams Management can be executed at a time (global = affecting all or a lot of players).
    • Between the end of a round and the beginning of the following, that "global" Teams Management is executed, followed by any "singular" Teams Management (player going to team X).
    • During the time between Teams Management and Round Start, no damage except from bomb can be taken (unless Teams Management are instant). This is to prevent people killing each other because the skin of a team won't represent the real one for that short moment.

    Known bugs :
    • None.

    CVars :
    • teamsmanagementinterfaceversion: Gives version -_-'
    • ----------
    • tmi_sound : Allow the interface to play a sound when teams are scrambled if the calling plugin doesn't. 0 = disabled, 1 = enabled. Def. 1.
    • ----------
    • tmi_fade : Allow the interface to fade-in players screens when teams are managed if the calling plugin doesn't. 0 = disabled, 1 = enabled. Def. 1.
    • tmi_fade_duration : Duration of the fade-in. Best values are around 250-1000. Def. 500.
    • ----------
    • tmi_delay : Time in seconds before round start when team will be scrambled. Default 0.1 (0.25 under CSGO).
    • tmi_blockdmg : If damage is blocked between the moment people are changing teams and round start. 0=no, 1=yes (default).

    --------------

    Any suggestions/comments on the code or the plugin are welcomed and appreciated.

    Changelog :
    • 1.0.0 Initial release. (10-04-2012)
    • 1.0.1 Corrected bug preventing to manually transfer more than one player per round. Also changed a bit the comments in the include file. (11-04-2012)
    • 1.0.2 Corrected bug where Teams Management would be carried over Draw Rounds (could be disastrous gameplay-wise; i.e. terrorists at CTs' spawn with CT's skin :$) (12-04-2012)
    • 1.0.3 Corrected crappy scrambling when a team has a fixed amount of players (i.e. 2vALL). (01-07-2012)
    • 1.0.4 Changed the way the end-game-team-managing-prevention works so it is more robust (KillTimer apparently brought some rare bug, having TIMER_FLAG_NO_MAPCHANGE flag concurence the "cs_win_panel_match" event sometimes...). Thanks to KyleS. (12-07-2012)
    • 1.1.0 (07-10-2012)
      • Added DOD:S support.
      • Added the possibility of instant teams management (rather than only on round end).
      • Made invulnerability more late (I really thought it was made more late than that :$).
    • 1.2.0 (27-12-2012)
      • Added CS:GO support.
      • Added the possibility to swap teams (i.e. CT <-> T => T <-> CT). See actionId == 4.
      • Now uses good fade color under DoD:S (Green/Red, rather than Red/Blue).
      • Fixed package using the 'cstrike' folder, as this is multi-mod.
    • 1.2.1 (23-01-2013)
      • Added support for protobuf. This means compatibility with the recent CSGO update.
      • Modified attachment structure (directly in mod folder now).
      • See notes as for why two versions are attached.
    • 1.2.2 (31-01-2013)
      • Changes tmi_delay default under CSGO to 0.25.
      • This should prevent a bug where everyone was invulnerable (under CSGO). Thanks to PsyGaming for reporting.
    • 1.2.3 (01-02-2013)
      • Bug where players were all invulnerable should now be fixed in all mods. (was still possible in CS:S by toying with round restart)

    Todo list :
    • Add team balance. (veeerrrry low priority)

    Notes :
    • SDKHooks are required to compile (and run).
    • Extract TeamsManagementInterface.zip in your server folder (sound/misc/ folder put aside, no folder should be created).
    • Since my .inc is heavily commented I won't paste it here.
    • Use 1.2.3 if you have mm:source 1.10.0-hg816 or later AND sourcemod 1.5.0-hg3755 or later for CSS/CSGO/DODS compatibility.
    • Use 1.2.0 if you are on SM stable branch (won't work on CSGO).
    Attached Files
    File Type: zip TeamsManagementInterface - 1.2.0.zip (122.6 KB, 466 views)
    File Type: zip TeamsManagementInterface - 1.2.3.zip (124.0 KB, 1359 views)
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 02-01-2013 at 00:05. Reason: 1.2.3; see changelog; 218dl
    RedSword is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 04-10-2012 , 00:31   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #2

    Plugins using this interface (by me) :


    Plugins using this interface (by others) :
    • No known yet.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 04-10-2012 at 01:44.
    RedSword is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 04-10-2012 , 00:32   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #3

    Also reserved.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Ares Veteran
    Senior Member
    Join Date: Jul 2010
    Location: Hungary
    Old 04-10-2012 , 02:24   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #4

    Starts being interesting.
    __________________
    P.M.C Clan
    pmcfighters.co.nr

    Ares Veteran is offline
    Send a message via MSN to Ares Veteran
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 04-10-2012 , 15:15   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #5

    Does this have immune level protections? If not would it be possible to add them?
    __________________
    Fearts is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 04-10-2012 , 18:17   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #6

    Quote:
    Originally Posted by Fearts View Post
    Does this have immune level protections? If not would it be possible to add them?
    We'll see; I'm considering it. I think I'll do it after I add specific player switch on round end. Not sure thought.

    You did mean when everyone's is scrambled right ? (i.e. fair/unfair scrambling ; as I don't see a immunity protection between admins useful...)

    Thanks for the interest,

    Red

    EDIT : Considering that I'd like people to be able to get scrambled if they're at least willing (for your protection thing), I'd need to do a keyvalue & menu thing; so I'd probably put that in a late spot on my todo list.

    Also, did you mean immunity level or a flag for immunity ?
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 04-10-2012 at 18:31.
    RedSword is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 04-10-2012 , 19:51   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #7

    I was talking about setting immunity levels so that a admin with level 5 immune couldn't switch the team of a admin with level 6.
    __________________
    Fearts is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 04-10-2012 , 19:59   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #8

    Quote:
    Originally Posted by Fearts View Post
    I was talking about setting immunity levels so that a admin with level 5 immune couldn't switch the team of a admin with level 6.
    O.o...

    I don't plan on adding that. It seems more to be an inter-admin problem, plus if the other guy has an higher immunity, I can guess he must have higher or about the same right, meaning he could simply cancel the team switch done on himself...

    You can try convincincing me otherwise, but I really don't see the point. Also sometimes even admins on ventrilo/teamspeak can ask you to change their teams for them...
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work
    RedSword is offline
    Fearts
    ferts of daeth
    Join Date: Oct 2008
    Old 04-10-2012 , 20:34   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #9

    It is a internal problem. However, it is hard to monitor and would be much easier to just have immune levels set. Reason being admins will use this to basically slay another admin. They will switch their team and then shoot them in the face. Like you said it is internal but would be a nice feature.
    __________________
    Fearts is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 04-10-2012 , 22:59   Re: [Dev + CS:S] Teams Management Interface
    Reply With Quote #10

    Quote:
    Originally Posted by Fearts View Post
    It is a internal problem. However, it is hard to monitor and would be much easier to just have immune levels set. Reason being admins will use this to basically slay another admin. They will switch their team and then shoot them in the face. Like you said it is internal but would be a nice feature.
    ...

    I think you didn't understand the point of this interface.

    There is absolutely no instant team switching options given by this plugins. ALL teams switch, managements and whatever are done between round end and round start, using CS_TeamSwitch() (so players do not die from it), making people not die from team switching. They're also immune during a small moment to other players damage (to prevent a short delay in which people can see each others with the models they had that round, but with the new teams affected to the player's entity; and I can't correct that since I don't know why the delay between round start and round end is never exactly the same).

    If you were testing under a different mod then CS:S, it could kill you (since I made it for CS:S and let a window of opportunity for other mods; but I'm not sure and it's untested under other mods)

    So I really don't see what you're afraid of. Did I misunderstand or does that sooth your fears and answer your questions ?

    Red

    EDIT : 1.0.1 is out :

    Corrected bug preventing to manually transfer more than one player per round. Also changed a bit the comments in the include file. (11-04-2012)

    RE-EDIT : Fearts, test it yourself with TMC

    RE-RE-EDIT : Updated Forewords to make it more clear .
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 04-11-2012 at 07:40. Reason: re-re-edit + more poetic ^^
    RedSword is offline
    Reply


    Thread Tools
    Display Modes

    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 22:12.


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