AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Manual Swap teams for HL2DM (https://forums.alliedmods.net/showthread.php?t=59576)

nisbus 08-16-2007 18:32

Manual Swap teams for HL2DM
 
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

Nican 08-17-2007 00:05

Re: Manual Swap teams for HL2DM
 
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;




All times are GMT -4. The time now is 17:45.

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