AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   CT To Terro & Terro To CT! (https://forums.alliedmods.net/showthread.php?t=299957)

Azeddine 07-31-2017 12:12

CT To Terro & Terro To CT!
 
Hello,
i need a plugin mod basebuilder,
after finish round , CT will be Terro, Terro will be CT
Please help me and thanks! :):)

WatchDogs 08-01-2017 07:26

Re: CT To Terro & Terro To CT!
 
Hi, Please search before post your request.

https://forums.alliedmods.net/showthread.php?p=667851

BraveFox 08-01-2017 21:13

Re: CT To Terro & Terro To CT!
 
PHP Code:

#include <sourcemod>
#include <cstrike>
#pragma semicolon 1
#pragma newdecls required

public Plugin myinfo = {
    
name        "[CSGO/CSS]Round end team switch",
    
author      "S4muRaY'",
    
description "Switch the player's team to the other team when the round end",
    
version     "1.0",
    
url         "http://steamcommunity.com/id/bravefox"
};

public 
void OnPluginStart()
{
    
HookEvent("round_end"round_end);
}
public 
Action round_end(Event eventchar[] namebool dontBroadcast)
{
    for(
int i 1<= MaxClientsi++)
    {
        if(
IsValidClient(i))
        {
            
int team GetClientTeam(i);
            if(
team == CS_TEAM_CT)
            {
                
CS_SwitchTeam(iCS_TEAM_T);
            }
            else if(
team == CS_TEAM_T)
            {
                
CS_SwitchTeam(iCS_TEAM_CT);
            }
        }
    }
}
stock bool IsValidClient(int client)
{
    if(
client MaxClients)
        return 
false;
    if(
client <= 0)
        return 
false;
    if(!
IsClientConnected(client))
        return 
false;
    return 
IsClientInGame(client);




All times are GMT -4. The time now is 11:53.

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