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

Manual Swap teams for HL2DM


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nisbus
Junior Member
Join Date: Jun 2007
Old 08-16-2007 , 18:32   Manual Swap teams for HL2DM
Reply With Quote #1

Here's an idea for plugin for HL2DM.

As Mani Admin doesn't allow the ma_swapteam in HL2DM I would love a plugin for admins to swap players between teams manually.
All too often people playing clan matches don't know how to change teams and it takes a lot of irate chatting to explain it to them

thanks,
nisbus
nisbus is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 08-17-2007 , 00:05   Re: Manual Swap teams for HL2DM
Reply With Quote #2

You mean a command sm_team (client) (team) ?

I have made this quick-source code, i use it for ZM, it should work for HL2DM too...


PHP Code:
#include <sourcemod>

#define PLUGIN_VERSION "1.0"

public Plugin:myinfo 
{
    
name "Change team",
    
author "Nican132",
    
description "Roll the dice",
    
version PLUGIN_VERSION,
    
url "http://www.sourcemod.net/"
};

public 
OnPluginStart()
{
    
RegAdminCmd("sm_team"ChangeTeamADMFLAG_KICK"sm_team <#userid|name> <team>");

}

public 
Action:ChangeTeam(clientargs){
    if (
args 2)
    {
        
ReplyToCommand(client"[SM] Usage: sm_team <#userid|name> <team>");
        return 
Plugin_Handled;
    }
    
    
decl String:arg[65];
    
GetCmdArg(1argsizeof(arg));

    new 
target FindTarget(clientargtrue false);
    if (
target == -1)
        return 
Plugin_Handled;

    
decl String:s_time[12];
    
GetCmdArg(2s_timesizeof(s_time));
    new 
team StringToInt(s_time);    
    
    if (
team || team 4)
        return 
Plugin_Handled;
    
    
GetClientName(targetargsizeof(arg));
    
    
ChangeClientTeam(targetteam);
    
    
PrintToChatAll("[SM] Admin has changed %s to team #%d"argteam

    return 
Plugin_Handled;

__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
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 05:35.


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