What wrong?
#1

pawn Код:
public OnPlayerText(playerid, text[])
{
new nString[256];
    strcat(nString,text,256);
    new PlayerName2[ 26 + 1];
    GetPlayerName( playerid, PlayerName2, 26 + 1 );
    if ( strfind( PlayerName2 ,"[DSR]",false ) != -1 )
    {
        format( nString,sizeof nString,"%s: %s", PlayerName2, text );
        strins( nString,"{D3D3D3}",0,10 );//[
        strins( nString,"{32DD02}",1,10 );//D
        strins( nString,"{FFFFFF}",2,10 );//S
        strins( nString,"{CD020C}",3,10 );//R
        strins( nString,"{D3D3D3}",4,10 );//]
        strins( nString,"{FFFFFF}",5,10 );//text..blablalbla
        SendClientMessageToAll( 0xFF4040AA,nString );
        return 0;
    }
    return 0;
}
Reply
#2

up

The message you have entered is too short. Please lengthen your message to at least 4 characters.
Reply
#3

pawn Код:
if ( strfind( PlayerName2 ,"[DSR]",false ) != -1 )
    {
        format( nString,sizeof nString,"%s: %s", PlayerName2, text );
        strins( nString,"{FFFFFF}",5,10 );//text..blablalbla
        strins( nString,"{D3D3D3}",4,10 );//]
        strins( nString,"{CD020C}",3,10 );//R
        strins( nString,"{FFFFFF}",2,10 );//S
        strins( nString,"{32DD02}",1,10 );//D
        strins( nString,"{D3D3D3}",0,10 );//[
        SendClientMessageToAll( 0xFF4040AA,nString );
        return 0;
    }
Reply
#4

pawn Код:
public OnPlayerText(playerid, text[])
{
/*Tag Colour*/
new nString[256];
    strcat(nString,text,256);
    new PlayerName2[ 26 + 1];
    GetPlayerName( playerid, PlayerName2, 26 + 1 );
    if ( strfind( PlayerName2 ,"[DSR]",false ) != -1 )
    {
        format( nString,sizeof nString,"%s: %s", PlayerName2, text );
        strins( nString,"{FFFFFF}",5,10 );//text..blablalbla
        strins( nString,"{06DAF7}",4,10 );//]
        strins( nString,"{CD020C}",3,10 );//R
        strins( nString,"{FFFFFF}",2,10 );//S
        strins( nString,"{32DD02}",1,10 );//D
        strins( nString,"{06DAF7}",0,10 );//[
        SendClientMessageToAll( 0xFF4040AA,nString );
        return 0;
    }
    return 0;
}
Ok work but.... The not DSR player cant write in chat
Reply
#5

Quote:
Originally Posted by SamyRomafia
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
/*Tag Colour*/
new nString[256];
    strcat(nString,text,256);
    new PlayerName2[ 26 + 1];
    GetPlayerName( playerid, PlayerName2, 26 + 1 );
    if ( strfind( PlayerName2 ,"[DSR]",false ) != -1 )
    {
        format( nString,sizeof nString,"%s: %s", PlayerName2, text );
        strins( nString,"{FFFFFF}",5,10 );//text..blablalbla
        strins( nString,"{06DAF7}",4,10 );//]
        strins( nString,"{CD020C}",3,10 );//R
        strins( nString,"{FFFFFF}",2,10 );//S
        strins( nString,"{32DD02}",1,10 );//D
        strins( nString,"{06DAF7}",0,10 );//[
        SendClientMessageToAll( 0xFF4040AA,nString );
        return 0;
    }
    return 0;
}
Ok work but.... The not DSR player cant write in chat

Last return should be 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)