Raised This Month: $ Target: $400
 0% 

solved.


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
EclipseCP
BANNED
Join Date: Dec 2010
Old 04-26-2011 , 03:14   solved.
#1

hi

I have a problem, I add the variable "g_level [id]"to this code, but do not know how to do it...

I want to add before the name

PHP Code:
iLen copy(iMessageiMsgLen"(Zombies) /*Here*/ %s1 : "); 
code: (prochat plugin)

PHP Code:
format_message(iMessage[], const iMsgLen, const iText[]) 

    new 
iHandleReturn[3]; // reutrn = [0]; team = [1]; alive = [2] 

    
if( equal(iMessage"#Cstrike_Name_Change") ) 
    { 

        
copy(iMessageiMsgLen"* %s1 changed name to %s2"); 

        
iHandleReturn[0] = -2
        return 
iHandleReturn

    } 

    new 
iLen;  
    if( 
equal(iMessage"#Cstrike_Chat_CT") ) 
    { 

        
iLen copy(iMessageiMsgLen"(Counter-Terrorist) %s1 : "); 

        
iHandleReturn[1] = 2
        
iHandleReturn[2] = 1

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_T") ) 
    { 
        
iLen copy(iMessageiMsgLen"(Terrorist) %s1 : "); 


        
iHandleReturn[1] = 1
        
iHandleReturn[2] = 1

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_CT_Dead") ) 
    { 
        
iLen copy(iMessageiMsgLen"*DEAD*(Counter-Terrorist) %s1 : "); 

        
iHandleReturn[1] = 2
        
iHandleReturn[2] = 0

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_T_Dead") ) 
    { 
        
iLen copy(iMessageiMsgLen"*DEAD*(Terrorist) %s1 : "); 

        
iHandleReturn[1] = 1
        
iHandleReturn[2] = 0

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_Spec") ) 
    { 
        
iLen copy(iMessageiMsgLen"(Spectator) %s1 : "); 

        
iHandleReturn[1] = 3
        
iHandleReturn[2] = 0

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_All") ) 
    { 
        
iLen copy(iMessageiMsgLen"%s1 : "); 

        
iHandleReturn[1] = 0
        
iHandleReturn[2] = 1

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_AllDead") ) 
    { 
        
iLen copy(iMessageiMsgLen"*DEAD* %s1 : "); 

        
iHandleReturn[1] = 0
        
iHandleReturn[2] = 0

    } 
    else if( 
equal(iMessage"#Cstrike_Chat_AllSpec") ) 
    { 
        
iLen copy(iMessageiMsgLen"*DEAD* %s1 : "); 

        
iHandleReturn[1] = 0
        
iHandleReturn[2] = 0

    } 
    else 
    { 

        
iHandleReturn[0] = PLUGIN_CONTINUE
        return 
iHandleReturn

    } 

    new 
iLen2 = (copy(iMessage[iLen], iMsgLen-iLeniText)-1); // last symbol is 0x10 - dunno what it is, but it dose nothing 
    
if( iLen2<=
    { 

        
iHandleReturn[0] = PLUGIN_HANDLED
        return 
iHandleReturn

    } 

    
iLen2+=iLen
    new 
bool:bWordExists
    for( 
iLen+=0iLen<iLen2iLen++ ) 
    { 
        if( 
iMessage[iLen]=='' || iMessage[iLen]=='' || iMessage[iLen]=='' || iMessage[iLen]=='' || iMessage[iLen]=='%' 
        
iMessage[iLen] = ' '
        else if( 
iMessage[iLen]!=' ' 
        
bWordExists true
    } 

    if( !
bWordExists 
    { 

        
iHandleReturn[0] = PLUGIN_HANDLED
        return 
iHandleReturn

    } 


    
iHandleReturn[0] = -1
    return 
iHandleReturn



Last edited by ConnorMcLeod; 04-26-2011 at 11:39.
EclipseCP is offline
Closed Thread


Thread Tools
Display Modes

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 04:17.


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