Raised This Month: $ Target: $400
 0% 

[TF2] Force Team (v1.00)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
floube
SourceMod Donor
Join Date: Jan 2013
Location: Austria
Plugin ID:
3657
Plugin Version:
1.00
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Forces clients to join a specific team on join/death
    Old 05-21-2013 , 06:04   [TF2] Force Team (v1.00)
    Reply With Quote #1

    Request: https://forums.alliedmods.net/showthread.php?t=216309

    Force Team (v1.00)

    Description:
    - Forces clients to join a specific team on join/death
    - Blocks manually joining teams

    ConVars:
    - sm_force_team_on_join "RED" // "BLU", "RED" or "SPEC"; Default: "RED"
    - sm_force_team_on_death "SPEC" // "BLU", "RED" or "SPEC"; Default: "SPEC"
    - sm_block_join_team "1" // "0" or "1"; Default: "1"

    Cheers,

    floube
    Attached Files
    File Type: sp Get Plugin or Get Source (forcejoin.sp - 790 views - 4.5 KB)

    Last edited by floube; 05-25-2013 at 06:58.
    floube is offline
    Ade
    I love purple
    Join Date: May 2010
    Old 05-21-2013 , 06:14   Re: [TF2] Force Team (v1.00)
    Reply With Quote #2

    what about blocking more than 1 team
    __________________
    Ade is offline
    floube
    SourceMod Donor
    Join Date: Jan 2013
    Location: Austria
    Old 05-21-2013 , 06:15   Re: [TF2] Force Team (v1.00)
    Reply With Quote #3

    If you talk about "sm_block_join_team", the 1 means that joining a team is blocked.

    I hope you understand that.. \o/

    floube
    floube is offline
    floube
    SourceMod Donor
    Join Date: Jan 2013
    Location: Austria
    Old 05-21-2013 , 16:09   Re: [TF2] Force Team (v1.00)
    Reply With Quote #4

    Hooking a console command means that if a player types it in console (or in this case switching team) then the function (which you set at the hook command) gets called.

    And when it gets called it just returns that it finished (so it is just saying that nothing happend as if the player never typed that command).

    floube ;)
    floube is offline
    kamuixmod18
    Junior Member
    Join Date: Apr 2013
    Old 05-23-2013 , 19:19   Re: [TF2] Force Team (v1.00)
    Reply With Quote #5

    There is a problem. When
    - sm_force_team_on_join "RED"
    - sm_force_team_on_death "SPEC"
    - sm_block_join_team "1"

    -Then i cant join back the Red team on Round-restart after i've been forced to team Spec on death.
    -By rejoining, i can enter team Red again, after death.
    -Round wont end, if nobody is left on team RED

    Last edited by kamuixmod18; 05-23-2013 at 19:23.
    kamuixmod18 is offline
    floube
    SourceMod Donor
    Join Date: Jan 2013
    Location: Austria
    Old 05-25-2013 , 06:58   Re: [TF2] Force Team (v1.00)
    Reply With Quote #6

    I hope it's fixed.

    Have fun
    floube is offline
    kamuixmod18
    Junior Member
    Join Date: Apr 2013
    Old 05-25-2013 , 23:40   Re: [TF2] Force Team (v1.00)
    Reply With Quote #7

    ehm "Plugin failed to compile! Please try contacting the author."

    is what i get when i click on the "Get Plugin link"
    kamuixmod18 is offline
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 05-26-2013 , 00:12   Re: [TF2] Force Team (v1.00)
    Reply With Quote #8

    Here's a version with the errors fixed. They were:
    • <sdktools> wasn't included
    • sizeof(twodimensionalstring[anything]) doesn't work, use sizeof(twodimensionalstring[]) instead
    • The symbol name event was already taken by the callback itself, so i renamed the second one to event2
    Hope this helps.
    Attached Files
    File Type: sp Get Plugin or Get Source (forcejoin.sp - 1229 views - 4.5 KB)
    __________________
    Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
    MasterOfTheXP is offline
    kamuixmod18
    Junior Member
    Join Date: Apr 2013
    Old 05-26-2013 , 00:31   Re: [TF2] Force Team (v1.00)
    Reply With Quote #9

    No Changes.

    Same problems as previously.

    When i die, i get moved to Spec -thats correct-
    When the round ends or mp_forcewin "cmd-anyteam" i still stay in spec -Wrong, it should move me back to RED on roundstart.

    When the last one is moved to Spec from the Red Team the round wont end - The round is supposed to end.
    kamuixmod18 is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 06-15-2013 , 21:24   Re: [TF2] Force Team (v1.00)
    Reply With Quote #10

    fixed so it compiles
    Attached Files
    File Type: sp Get Plugin or Get Source (forcejoin.sp - 803 views - 5.1 KB)
    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.
    Zephyrus 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 18:34.


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