Raised This Month: $ Target: $400
 0% 

CT To Terro & Terro To CT!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 07-31-2017 , 12:12   CT To Terro & Terro To CT!
Reply With Quote #1

Hello,
i need a plugin mod basebuilder,
after finish round , CT will be Terro, Terro will be CT
Please help me and thanks!
Azeddine is offline
WatchDogs
Senior Member
Join Date: Oct 2015
Location: Iran
Old 08-01-2017 , 07:26   Re: CT To Terro & Terro To CT!
Reply With Quote #2

Hi, Please search before post your request.

https://forums.alliedmods.net/showthread.php?p=667851
__________________
WatchDogs is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 08-01-2017 , 21:13   Re: CT To Terro & Terro To CT!
Reply With Quote #3

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);

__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox 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 09:29.


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