Raised This Month: $ Target: $400
 0% 

[REQ] USP Ninja Team swap (CS GO)


Post New Thread Reply   
 
Thread Tools Display Modes
malec321
Senior Member
Join Date: May 2009
Location: Los Angeles
Old 02-11-2019 , 01:14   Re: [REQ] USP Ninja Team swap (CS GO)
Reply With Quote #11

Hey guys, sorry to bring back an old post.. I had tipped someone to help me finish a plugin to do all this, but he is no longer interested in coding/finishing this off. I have most of the code ready and just have a few things to fix. I will tip anyone who can finish this off for me! The problem that I am having now is that the teams are not switching properly when the CT's win.

edit: pm me and i will get back to you once I get up in the morning, thx!
__________________
Ayyylmao

Last edited by malec321; 02-11-2019 at 01:18.
malec321 is offline
Rowdy4E
Junior Member
Join Date: Nov 2018
Location: Czech Republic
Old 02-12-2019 , 05:36   Re: [REQ] USP Ninja Team swap (CS GO)
Reply With Quote #12

Quote:
Originally Posted by malec321 View Post
Hello!

Is there anyone that can either point me in the right direction or maybe help me out?

I'm looking for a plugin that does the following:

When CT's win, swap teams completely (everyone in CT gets swapped to T, and everyone that's in T gets swapped to CT)

When T's win, do nothing and leave teams as is.

I've tried to search and was unable to find anything that does this
Try this...

PHP Code:
#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "Rowdy"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdktools>

#pragma newdecls required

public Plugin myinfo 
{
    
name "SwapTeams?",
    
author PLUGIN_AUTHOR,
    
description "...",
    
version PLUGIN_VERSION,
    
url "https://steamcommunity.com/profiles/76561198307962930"
};

public 
void OnPluginStart()
{
    
HookEvent("round_end"OnRoundEnd);
}

public 
void OnRoundEnd(Handle eventchar[] namebool dontBroadcast) {
    
int winner GetEventInt(event"winner");
    
    if (
winner == 3) {
        for (
int i 1<= MaxClientsi++) {
            if (
GetClientTeam(i) == 2) {
                
ChangeClientTeam(i3);
            } else if (
GetClientTeam(i) == 3) {
                
ChangeClientTeam(i2);
            }
        }
    }

Rowdy4E 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 05:40.


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