Raised This Month: $32 Target: $400
 8% 

status for mix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 01-27-2020 , 03:29   status for mix
Reply With Quote #1

I want a plugin for Mix as below
[CT or Trr] 9-Round Win to swap (amx_swap) team
[CT or Trr] 15 Round Win End mix and Automatically warmup (amx_warm)
say /status = (Result) As in the example below:
PHP Code:
Colorchat(id"CT [(ct-round-win)/15 round win] and TRR [(trr-round-win)/15 round win]"); 

Last edited by alferd; 01-27-2020 at 03:31.
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-27-2020 , 09:22   Re: status for mix
Reply With Quote #2

Untested. Was already working on a swap system while i didn't realise u have a command for that, that's why there's code between comment lines.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <colorchat>

#define PLUGIN "MixSwap"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new szTextMsg
new iTerWin;
new 
iCtWin;

//new CsTeams:iOldTeam;
//new CsTeams:iNewTeam;

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /status""ShowScore");
    
    
szTextMsg get_user_msgid("TextMsg");
    
register_message(szTextMsg"msgTextMsg");
}

public 
msgTextMsg()
{
    static 
szMsg[22];
    
get_msg_arg_string(2szMsgcharsmax(szMsg));
    
    if(
equal(szMsg"#Terrorists_Win"))
    {
        
iTerWin++;
        if(
iTerWin == 9)
        {
            
server_cmd("amx_swap");
            
iTerWin iCtWin;
            
//CheckTeams();
        
}
        else if(
iTerWin == 15)
        {
            
server_cmd("amx_warm");
        }
    }
    
    
    else if(
equal(szMsg"#CTs_Win"))
    {    
        
iCtWin++;
        if(
iCtWin == 9)
        {
            
server_cmd("amx_swap");
            
iCtWin iTerWin;
            
//CheckTeams();
        
}
        
        else if(
iCtWin == 15)
        {
            
server_cmd("amx_warm");
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
ShowScore(id)
{
    
ColorChat(idGREEN"[CT WINS]: %i | [TER WINS]: %i"iCtWiniTerWin);
}

/*CheckTeams()
{
    new iPlayers[32], iNum;
    get_players(iPlayers, iNum);
            
    for(new i; i < iNum; i++)
    {
        iOldTeam = cs_get_user_team(iPlayers[i]);
                
        if(iOldTeam == CS_TEAM_T)
        {
            iNewTeam = CS_TEAM_CT;
        }
        else if(iOldTeam == CS_TEAM_CT)
        {
            iNewTeam = CS_TEAM_T;
        }
        cs_set_user_team(iPlayers[i], iNewTeam);
    }
}* 
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 01-27-2020 , 10:23   Re: status for mix
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
Untested. Was already working on a swap system while i didn't realise u have a command for that, that's why there's code between comment lines.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <colorchat>

#define PLUGIN "MixSwap"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new szTextMsg
new iTerWin;
new 
iCtWin;

//new CsTeams:iOldTeam;
//new CsTeams:iNewTeam;

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_clcmd("say /status""ShowScore");
    
    
szTextMsg get_user_msgid("TextMsg");
    
register_message(szTextMsg"msgTextMsg");
}

public 
msgTextMsg()
{
    static 
szMsg[22];
    
get_msg_arg_string(2szMsgcharsmax(szMsg));
    
    if(
equal(szMsg"#Terrorists_Win"))
    {
        
iTerWin++;
        if(
iTerWin == 9)
        {
            
server_cmd("amx_swap");
            
iTerWin iCtWin;
            
//CheckTeams();
        
}
        else if(
iTerWin == 15)
        {
            
server_cmd("amx_warm");
        }
    }
    
    
    else if(
equal(szMsg"#CTs_Win"))
    {    
        
iCtWin++;
        if(
iCtWin == 9)
        {
            
server_cmd("amx_swap");
            
iCtWin iTerWin;
            
//CheckTeams();
        
}
        
        else if(
iCtWin == 15)
        {
            
server_cmd("amx_warm");
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
ShowScore(id)
{
    
ColorChat(idGREEN"[CT WINS]: %i | [TER WINS]: %i"iCtWiniTerWin);
}

/*CheckTeams()
{
    new iPlayers[32], iNum;
    get_players(iPlayers, iNum);
            
    for(new i; i < iNum; i++)
    {
        iOldTeam = cs_get_user_team(iPlayers[i]);
                
        if(iOldTeam == CS_TEAM_T)
        {
            iNewTeam = CS_TEAM_CT;
        }
        else if(iOldTeam == CS_TEAM_CT)
        {
            iNewTeam = CS_TEAM_T;
        }
        cs_set_user_team(iPlayers[i], iNewTeam);
    }
}* 
Your CheckTeams() function can be just that, without using any global variables.

PHP Code:
CheckTeams()
{
    new 
iPlayers[32], iNumid
    get_players
(iPlayersiNum)
    for(new 
iiNum;i++)
    {
        
id iPlayers[i]

        if(
<= get_user_team(id) <= 2)
        {
            
cs_set_user_team(id, (get_user_team(id) == 1) ? CS_TEAM_CT CS_TEAM_T)
        }
    }

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/

Last edited by iceeedr; 01-27-2020 at 10:24.
iceeedr is offline
Send a message via Skype™ to iceeedr
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-27-2020 , 10:25   Re: status for mix
Reply With Quote #4

Yea i wasn't finished yet, thanks though, also i won't be posting codes that only support 1.9
__________________

Last edited by Napoleon_be; 01-27-2020 at 10:27.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-28-2020 , 01:30   Re: status for mix
Reply With Quote #5

What is this suppose to do server_cmd("amx_swap");?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-28-2020 , 06:28   Re: status for mix
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
What is this suppose to do server_cmd("amx_swap");?
Probably a plugin that arranges the team swaps? If not then i have no idea, those are commands he gave me to use.

Don't think it really matters anymore, he got banned.
__________________

Last edited by Napoleon_be; 01-28-2020 at 06:28.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-05-2020 , 03:02   Re: status for mix
Reply With Quote #7

This plugin is not working properly...
Example:
Trr 4 round win and CT 3 round win

But the answer is the plugin(say /status):
[CT WINS]: 1 | [TER WINS]: 2 (or 1)

where is the problem from???
alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-05-2020 , 03:06   Re: status for mix
Reply With Quote #8

What is this code for?
PHP Code:
CheckTeams()
{
    new 
iPlayers[32], iNumid
    get_players
(iPlayersiNum)
    for(new 
iiNum;i++)
    {
        
id iPlayers[i]

        if(
<= get_user_team(id) <= 2)
        {
            
cs_set_user_team(id, (get_user_team(id) == 1) ? CS_TEAM_CT CS_TEAM_T)
        }
    }

alferd is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-05-2020 , 03:41   Re: status for mix
Reply With Quote #9

Can you do it for me??
When hit (say /live or amx_live), the plugin will then display the results

And when hit (say /warm or amx_warm), the plugin will no longer show results

Example:
(say /live or amx_live) start the mix mod (say /status)
[CT WINS]: 0 | [TER WINS]: 0

(say /warm or amx_warm) And when the player hits (say /status) It gets the answer in the form
PHP Code:
client_print (idprint_chat"Server Not Mix"); 
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-09-2020 , 09:45   Re: status for mix
Reply With Quote #10

Quote:
Originally Posted by alferd View Post
What is this code for?
PHP Code:
CheckTeams()
{
    new 
iPlayers[32], iNumid
    get_players
(iPlayersiNum)
    for(new 
iiNum;i++)
    {
        
id iPlayers[i]

        if(
<= get_user_team(id) <= 2)
        {
            
cs_set_user_team(id, (get_user_team(id) == 1) ? CS_TEAM_CT CS_TEAM_T)
        }
    }

This code had the purpose of swapping teams, but since amx_swap does that, it's not required to have in that plugin.

Also give me some pictures of the bugs so that i can change my code where nessecary
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 20:51.


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