Raised This Month: $ Target: $400
 0% 

[REQ] T swap to ct and ct no swap


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-26-2017 , 21:38   [REQ] T swap to ct and ct no swap
Reply With Quote #1

Hello guys, i need a plugin that Swaps the terorrist to CT when they win and the usual CT will be transfered to Terrorist and when CT win they stay CT.
Thanks
__________________
___________________________________________



Last edited by MerreBigger; 12-27-2017 at 08:28.
MerreBigger is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-27-2017 , 06:33   Re: T swap to ct and ct no swap
Reply With Quote #2

Whats the definition of usual CT?
__________________
Relaxing is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-27-2017 , 08:18   Re: T swap to ct and ct no swap
Reply With Quote #3

I don't understand. What is definition?
__________________
___________________________________________


MerreBigger is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2017 , 08:46   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #4

Oh boy, here we go trying to give a definition for definition. @Relaxing - he meant the ones who were already CT should become T.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-27-2017 , 08:57   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #5

Yes so actually
Terrorist win --> they go CT and the ones who were CT becomes T
Counter Terrorist win --> They stay CT and T stays T
__________________
___________________________________________


MerreBigger is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-27-2017 , 10:37   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #6

This is the opposite of furien team changer. Find the source of it and post it here. The only thing that you must change is the event. CT to T.
__________________
Relaxing is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-27-2017 , 10:53   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #7

This one?
PHP Code:
#include <amxmodx> 
#include <fakemeta> 

#define VERSION "0.0.1" 
#define PLUGIN "Team Switch On CT Win" 

#define XO_PLAYER 5 
#define m_iTeam 114 
#define OFFSET_INTERNALMODEL 126 

#define cs_get_user_team_index(%0)    get_pdata_int(%0, m_iTeam, XO_PLAYER) 

enum 

    
TEAM_UNASSIGNED
    
TEAM_TERRORIST
    
TEAM_CT
    
TEAM_SPECTATOR 


new const 
g_szTeamNames[][] =  

    
"UNASSIGNED"
    
"TERRORIST"
    
"CT"
    
"SPECTATOR" 


enum 

    
CT_URBAN 1
    
T_TERROR 2
    
T_LEET 3
    
T_ARCTIC 4
    
CT_GSG9 5
    
CT_GIGN 6
    
CT_SAS 7
    
T_GUERILLA 8
    
CT_VIP 9
    
T_MILITIA 10
    
CT_SPETSNAZ 11 


new const 
g_iModels[][] =  

    {
T_TERRORCT_URBAN}, 
    {
T_LEET CT_GSG9}, 
    {
T_LEETCT_SAS}, 
    {
T_GUERILLACT_GIGN}, 
    {
T_MILITIACT_SPETSNAZ


new const 
g_szModels[][] =  

    
""
    
"urban"
    
"terror"
    
"leet"
    
"arctic"
    
"gsg9"
    
"gign"
    
"sas"
    
"guerilla"
    
"vip"
    
"militia"
    
"spetsnaz" 


new 
g_iMaxAppearances 

new g_iTeamInfo 

public plugin_init() 

    
register_plugin(PLUGINVERSION"ConnorMcLeod"
    
register_event("SendAudio""Event_SendAudio_MRAD_ctwin""a""2&%!MRAD_ctwin"
    new 
szModName[6
    
get_modname(szModNamecharsmax(szModName)) 
    if( 
equal(szModName"czero") ) 
    { 
        
g_iMaxAppearances 
    


    
g_iTeamInfo get_user_msgid("TeamInfo"


public 
Event_SendAudio_MRAD_ctwin() 

    new 
iPlayers[32], iNum 
    get_players
(iPlayersiNum"h"
    if( 
iNum 
    { 
        new 
id 
        
for(--iNumiNum>=0iNum--) 
        { 
            
id iPlayers[iNum
            switch( 
cs_get_user_team_index(id) ) 
            { 
                case 
TEAM_TERRORIST:SetUserTeam(idTEAM_CT
                case 
TEAM_CT:SetUserTeam(idTEAM_TERRORIST
            } 
        } 
    } 


SetUserTeam(idiTeam

    
set_pdata_int(idm_iTeamiTeamXO_PLAYER

    new 
iNewModel g_iModels[iTeam-1][  random(g_iMaxAppearances)  ] 

    
set_pdata_int(idOFFSET_INTERNALMODELiNewModelXO_PLAYER

    
set_user_info(id"model"g_szModels[iNewModel]) 

    
emessage_begin(MSG_ALLg_iTeamInfo
    
ewrite_byte(id
    
ewrite_string(g_szTeamNames[iTeam]) 
    
emessage_end() 

__________________
___________________________________________


MerreBigger is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-27-2017 , 11:00   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #8

Or this one is maybe easier..
But its not what im looking for, this is is team swap when CT's win, a want a team swap when T wins..
PHP Code:
#include <amxmodx> 
#include <cstrike> 

new const VERSION[] = "0.0.3" 

const MAX_PLAYERS 32 

public plugin_init() 

    
register_plugin("Switch Teams On Ct Wins"VERSION"ConnorMcLeod"

    
register_event("SendAudio""Event_SendAudio_MRAD_ctwin""a""1=0""2=%!MRAD_ctwin"


//http://wiki.amxmodx.org/Half-Life_1_Game_Events#SendAudio 
public Event_SendAudio_MRAD_ctwin() 

    new 
iPlayers[MAX_PLAYERS], iNumid 
    get_players
(iPlayersiNum
    for(new 
ii<iNumi++) 
    { 
        
id iPlayers[i
        switch( 
cs_get_user_team(id) ) 
        { 
            case 
CS_TEAM_T
            { 
                
cs_set_user_team(idCS_TEAM_CTCS_CT_GIGN
            } 
            case 
CS_TEAM_CT
            { 
                
cs_set_user_team(idCS_TEAM_TCS_T_LEET
            } 
        } 
    } 

__________________
___________________________________________



Last edited by MerreBigger; 12-27-2017 at 11:00.
MerreBigger is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-27-2017 , 11:18   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #9

Change the 5th parameter with 2&%!MRAD_terwin
__________________

Last edited by Relaxing; 12-27-2017 at 11:27.
Relaxing is offline
MerreBigger
Senior Member
Join Date: Nov 2012
Location: Belgium
Old 12-27-2017 , 14:28   Re: [REQ] T swap to ct and ct no swap
Reply With Quote #10

i don't understand.. how can i do this?
__________________
___________________________________________


MerreBigger 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 02:36.


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