Raised This Month: $51 Target: $400
 12% 

plz help (mix status)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-08-2020 , 01:51   plz help (mix status)
Reply With Quote #1

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???

PHP Code:
#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], 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)
        }
    }

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

Last edited by alferd; 02-08-2020 at 01:52.
alferd 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:40.


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