AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Chat bug HELP!!! (https://forums.alliedmods.net/showthread.php?t=317693)

remix.allstarz 07-24-2019 16:29

Chat bug HELP!!!
 
Hey guys sry for my english but i need help

When i say anything in chat it come: s1 : s2 i cant type anything why??
in sma


else{
add(szTmp2, charsmax(szTmp2), szPrefix);
add(szTmp2, charsmax(szTmp2), "^x03 %s1^x01 : %s2");
}

thEsp 07-24-2019 16:35

Re: Chat bug HELP!!!
 
1. Learn your native language. Google can still translate to English (and vice versa) decently.
2. Post full script.
3. Add it on [php] or [small] tag, so it's human-understandable.

remix.allstarz 07-24-2019 16:48

Re: Chat bug HELP!!!
 
1 Attachment(s)
sry i mean

if I write something in the chat comes s1: s2

i upload SMA

SomewhereLost 07-24-2019 22:42

Re: Chat bug HELP!!!
 
Its basically because of this part after valve updated the cs version in 2018.

PHP Code:

public MessageSayTextiMsgIDiDestiReceiver )
{
    if( 
get_pcvar_numg_iHideChangeNickNotification ) )
    {    
        new const 
Cstrike_Name_Change[ ] = "#Cstrike_Name_Change"
        
        
new szMessagesizeofCstrike_Name_Change ) + ]
        
get_msg_arg_string2szMessagecharsmaxszMessage ) )
        
        if( 
equalszMessageCstrike_Name_Change ) )
        {
            return 
PLUGIN_HANDLED
        
}
    }
    
    return 
PLUGIN_CONTINUE
}
public 
handleSayText(msgIdmsgDestmsgEnt){
    new 
id get_msg_arg_int(1);
    
    if(
is_user_connected(id)){
        new 
szTmp[190],
            
szTmp2[190];
            
        
get_msg_arg_string(2szTmpcharsmax(szTmp));
        
        new 
szPrefix[64]; 
        new 
Style;
        
Style get_pcvar_numCvarStyle );
        
//formatex(szPrefix,charsmax( szPrefix ),"^x04[%s]{%.2f}", CLASSES[ g_iLevels[ id ]], 1.0*g_iKills[ id ]/g_iDeaths[ id ]);
        
        
switch(Style) {
                case 
1formatex(szPrefix,charsmaxszPrefix ),"");
                case 
2formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]"CLASSESg_iLevelsid ]]);
                case 
3formatex(szPrefix,charsmaxszPrefix ),"^x04[%s]{%.2f}"CLASSESg_iLevelsid ]], 1.0*g_iKillsid ]/g_iDeathsid ]);
                case 
4formatex(szPrefix,charsmaxszPrefix ),"^x04{%.2f}"1.0*g_iKillsid ]/g_iDeathsid ]);
            }
        
        if(!
equal(szTmp"#Cstrike_Chat_All")){
            
add(szTmp2charsmax(szTmp2), szPrefix);
            
add(szTmp2charsmax(szTmp2), " ");
            
add(szTmp2charsmax(szTmp2), szTmp);
        }
        else{
            
add(szTmp2charsmax(szTmp2), szPrefix);
            
add(szTmp2charsmax(szTmp2), "^x03 %s2^x01 :  %s1");
        }
        
set_msg_arg_string(2szTmp2);
    }
    return 
PLUGIN_CONTINUE;


You use this plugin on a nonsteam server where either you or anybody else is using Steam while others do not and a steam user can see their messages and names as s1: s2.


All times are GMT -4. The time now is 17:20.

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