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

[L4D & L4D2] Switch Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author
djromero
Senior Member
Join Date: Dec 2008
Location: Maracaibo, Venezuela
Plugin ID:
727
Plugin Version:
1.4
Plugin Category:
Admin Commands
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    127 
    Plugin Description:
    Adds an option to the player's menu that allows an admin to change player's team
    Old 01-18-2009 , 02:05   [L4D & L4D2] Switch Players
    Reply With Quote #1

    This plugin allows any admin with Kick permissions to switch player's teams at will.

    A new option will be added to the player's menu. (It depends on AdminMenu).

    To install, copy the l4dswitchplayers.smx file to the sourcemod/plugins folder, and the l4dswitchplayers.txt file to the sourcemod/gamedata folder, and then restart your server.

    The SDK calls to correctly switch players to the Survivor's team were taken from the L4DUnscrambler plugin made by Fyren (http://forums.alliedmods.net/showthread.php?p=730278). I used them as he suggested in another post.

    As you should know by now, Valve restricted team switchs to 1 per map, and also you can't switch while people are still connecting. With this plugin you will be able to switch yourself or any other player to any team (spectators, survivors or infected).

    Changelog:

    1.0:
    - Initial release

    1.1:
    - Added a validation to check if target team is already full.

    1.2:
    - Fixed some issues with the team full check function.
    - Added cvar to bypass team full check (l4dswitch_checkteams). Default is 1. Change to 0 to disable it.
    - Added new "Swap players" option to player's menu. This will allow you to immediately switch 2 players to each other's team.

    1.2.1:
    - Added public cvar.

    1.3:
    - Fixed plubic cvar to disable check of full teams.
    - Added validations to prevent log errors when a player leaves the game before it gets switched/swapped.

    1.4:
    - Added support for L4D2. Thanks to AtomicStryker for providing updated signatures.
    Attached Files
    File Type: sp Get Plugin or Get Source (L4DSwitchPlayers.sp - 30950 views - 12.0 KB)
    File Type: txt l4dswitchplayers.txt (1.1 KB, 19213 views)
    __________________
    David Romero



    Last edited by djromero; 11-26-2009 at 15:17. Reason: Upgraded to version 1.4
    djromero is offline
    Big Myke
    Senior Member
    Join Date: Jan 2009
    Location: Grain Belt, USA
    Old 01-18-2009 , 02:42   Re: [L4D] Switch Players
    Reply With Quote #2

    Thanks, i'll give it a shot and report back ;D
    Big Myke is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 01-18-2009 , 02:54   Re: [L4D] Switch Players
    Reply With Quote #3

    Quote:
    Originally Posted by Big Myke View Post
    Thanks, i'll give it a shot and report back ;D
    Download it again, i just updated it .... found a little flaw in it , but is fine now
    __________________
    David Romero


    djromero is offline
    Big Myke
    Senior Member
    Join Date: Jan 2009
    Location: Grain Belt, USA
    Old 01-18-2009 , 03:05   Re: [L4D] Switch Players
    Reply With Quote #4

    Ok Thanks, i updated it. It works like a charm man. Thanks!

    Last edited by Big Myke; 01-18-2009 at 03:18.
    Big Myke is offline
    santaclaus
    Senior Member
    Join Date: Dec 2008
    Old 01-18-2009 , 05:48   Re: [L4D] Switch Players
    Reply With Quote #5

    hey i was waiting for that nice !!
    __________________

    santaclaus is offline
    JaymZ
    Junior Member
    Join Date: Jan 2009
    Location: France
    Old 01-19-2009 , 18:16   Re: [L4D] Switch Players
    Reply With Quote #6

    Hi

    Quote:
    Originally Posted by djromero View Post
    A new option will be added to the player's menu. (It depends on AdminMenu).
    Did we have something to edit for? 'cause I have nothing new in the player's menu

    In fact, nothing happened when I hit "1" (to open the player's menu) I guess my adminmenu_cfgs.txt is not configured... I have only that:

    Code:
    Configs
    {
    	"cfg/server.cfg"			"Standard Server Setup"
    	"cfg/sourcemod/sm_warmode_on.cfg"	"War Mode On"
    	"cfg/sourcemod/sm_warmode_off.cfg"	"War Mode Off"
    }
    Any idea?
    JaymZ is offline
    santaclaus
    Senior Member
    Join Date: Dec 2008
    Old 01-19-2009 , 20:48   Re: [L4D] Switch Players
    Reply With Quote #7

    you should have smth.
    It isn't related to admin_menu_cfgs.txt.
    __________________

    santaclaus is offline
    JaymZ
    Junior Member
    Join Date: Jan 2009
    Location: France
    Old 01-20-2009 , 15:21   Re: [L4D] Switch Players
    Reply With Quote #8

    Quote:
    Originally Posted by santaclaus View Post
    you should have smth.
    Sorry but I'm terribly noob... what is "smth"? (I googled it but nothing)
    JaymZ is offline
    Downtown1
    Veteran Member
    Join Date: Mar 2004
    Old 01-20-2009 , 15:31   Re: [L4D] Switch Players
    Reply With Quote #9

    You might want to make sure that the teams aren't full before trying to switch a player.
    Downtown1 is offline
    djromero
    Senior Member
    Join Date: Dec 2008
    Location: Maracaibo, Venezuela
    Old 01-20-2009 , 15:43   Re: [L4D] Switch Players
    Reply With Quote #10

    Quote:
    Originally Posted by Downtown1 View Post
    You might want to make sure that the teams aren't full before trying to switch a player.
    Why??? That's the fun part

    You're right. I'll add the validation.
    __________________
    David Romero


    djromero 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 10:48.


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