Raised This Month: $ Target: $400
 0% 

edit a plugin text


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ahmad111
Member
Join Date: Jul 2019
Old 05-21-2020 , 23:15   edit a plugin text
Reply With Quote #1

al salam alykom
hi guys

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < ColorChat >

#pragma semicolon 1

#define SEMI_ACE 4


static const

    
PLUGIN[ ] =        "Ace_announcement",
    
VERSION[ ] =        "1.1",
    
AUTHOR[ ] =        "Rap^^",
    
    
TAG[ ] =        "[ACE ANNOUNCEMENT]";


new 
g_iFrags33 ];

new 
iForward;


public 
plugin_init( )
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
register_cvarPLUGINAUTHORFCVAR_SERVER );
    
    
register_event"HLTV""EventNewRound""a""1=0""2=0" );
    
register_event"DeathMsg""EventDeathMsg""a" );
    
    
register_logevent"LogEventRoundEnd"2"1=Round_End" );
    
    
iForward  CreateMultiForward"FwdPlayerDidAceOrSemi"ET_STOPFP_CELLFP_CELL );
}

public 
plugin_end( )
{
    
DestroyForwardiForward );
}

public 
client_connectid )
{
    
g_iFragsid ] = 0;
}

public 
EventNewRound( )
{
    
arraysetg_iFrags0sizeof g_iFrags );
}

public 
EventDeathMsg( )
{
    new 
iKiller read_data);
    new 
iVictim read_data);
    
    
CheckAceiVictim );
    
    if( !
iKiller || iKiller == iVictim || cs_get_user_teamiKiller ) == cs_get_user_teamiVictim ) )
    {
        return 
PLUGIN_CONTINUE;
    }
    
    
g_iFragsiKiller ]++;
    
    return 
PLUGIN_CONTINUE;
}

public 
LogEventRoundEnd( )
{
    new 
iPlayers32 ], iNumplayer;
    
    
get_playersiPlayersiNum"ch" );
    
    for( new 
0iNumi++ )
    {
        
player iPlayers];
        
        if( 
g_iFragsplayer ] >= SEMI_ACE )
        {
            
DidAceOrSemiplayer );
            
            if( 
g_iFragsplayer ] == SEMI_ACE )
            {
                return 
PLUGIN_CONTINUE;
            }
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
CheckAceid )
{
    if( 
g_iFragsid ] >= SEMI_ACE )
    {
        
DidAceOrSemiid );
    }
    
    
g_iFragsid ] = 0;
}

public 
DidAceOrSemiid )
{
    new 
iReturn PLUGIN_CONTINUE;
    
    
ExecuteForwardiForwardiReturnidg_iFragsid ] );
    
    if( 
iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
    {
        return 
PLUGIN_HANDLED;
    }
    
    new 
szName32 ];
    
    
get_user_nameidszNamesizeof szName );
            
    
ColorChat0GREEN"%s^x03 %s^x01 made a%s ^x03%sACE ( 5 kills/+5kills)^x01.",
    
TAGszNameg_iFrags id ] == SEMI_ACE "" "n"g_iFrags id ] == SEMI_ACE "SEMI-" "" );
    
    
client_cmd0"spk vox/buzwarn" );
    
    return 
PLUGIN_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
i have this plugin i try to edit the texts
when player kills 5 player its up player made ACE ( 5 kills/+5kills)
and 4 player player made SIME-ACE(4 kills)
but when the player kill 4 players its up made SIME-ACE(5 kills/+5kills)

how to fix it ?

Last edited by Ahmad111; 05-22-2020 at 00:37.
Ahmad111 is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-22-2020 , 03:00   Re: edit a plugin text
Reply With Quote #2

Now try
PHP Code:
#include < amxmodx >
#include < cstrike >
#include < ColorChat >

#pragma semicolon 1

#define SEMI_ACE 4


static const

    
PLUGIN[ ] =        "Ace_announcement",
    
VERSION[ ] =        "1.1",
    
AUTHOR[ ] =        "Rap^^",
    
    
TAG[ ] =        "[ACE ANNOUNCEMENT]";


new 
g_iFrags33 ];

new 
iForward;


public 
plugin_init( )
{
    
register_pluginPLUGINVERSIONAUTHOR );
    
register_cvarPLUGINAUTHORFCVAR_SERVER );
    
    
register_event"HLTV""EventNewRound""a""1=0""2=0" );
    
register_event"DeathMsg""EventDeathMsg""a" );
    
    
register_logevent"LogEventRoundEnd"2"1=Round_End" );
    
    
iForward  CreateMultiForward"FwdPlayerDidAceOrSemi"ET_STOPFP_CELLFP_CELL );
}

public 
plugin_end( )
{
    
DestroyForwardiForward );
}

public 
client_connectid )
{
    
g_iFragsid ] = 0;
}

public 
EventNewRound( )
{
    
arraysetg_iFrags0sizeof g_iFrags );
}

public 
EventDeathMsg( )
{
    new 
iKiller read_data);
    new 
iVictim read_data);
    
    
CheckAceiVictim );
    
    if( !
iKiller || iKiller == iVictim || cs_get_user_teamiKiller ) == cs_get_user_teamiVictim ) )
    {
        return 
PLUGIN_CONTINUE;
    }
    
    
g_iFragsiKiller ]++;
    
    return 
PLUGIN_CONTINUE;
}

public 
LogEventRoundEnd( )
{
    new 
iPlayers32 ], iNumplayer;
    
    
get_playersiPlayersiNum"ch" );
    
    for( new 
0iNumi++ )
    {
        
player iPlayers];
        
        if( 
g_iFragsplayer ] >= SEMI_ACE )
        {
            
DidAceOrSemiplayer );
            
            if( 
g_iFragsplayer ] == SEMI_ACE )
            {
                return 
PLUGIN_CONTINUE;
            }
        }
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
CheckAceid )
{
    if( 
g_iFragsid ] >= SEMI_ACE )
    {
        
DidAceOrSemiid );
    }
    
    
g_iFragsid ] = 0;
}

public 
DidAceOrSemiid )
{
    new 
iReturn PLUGIN_CONTINUE;
    
    
ExecuteForwardiForwardiReturnidg_iFragsid ] );
    
    if( 
iReturn == PLUGIN_HANDLED || iReturn == PLUGIN_HANDLED_MAIN )
    {
        return 
PLUGIN_HANDLED;
    }
    
    new 
szName32 ];
    
    
get_user_nameidszNamesizeof szName );
            
    
ColorChat0GREEN"%s^x03 %s^x01 made a%s ^x03%sACE ( %s )^x01.",
    
TAGszNameg_iFrags id ] == SEMI_ACE "" "n"g_iFrags id ] == SEMI_ACE "SEMI-" "" g_iFrags[id] == SEMI_ACE "4 kills/+4kills""5 kills/+5kills");
    
    
client_cmd0"spk vox/buzwarn" );
    
    return 
PLUGIN_HANDLED;

instinctpt1 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 17:07.


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