[Help] Chat name no [ID]
#1

How can i add id number after my name??

It clearly explains all.
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(IsPlayerConnected(playerid))
    {
        new msg[256];
        format(msg,sizeof(msg),"(%d){FFFFFF} %s",playerid,text);
        SendPlayerMessageToAll(playerid,msg);
        return 0;
    }
    return 1;
}
Not tested
Reply
#3

I believe you want something like this:-

pawn Код:
public OnPlayerText(playerid, text[])
{
    new szChatString[ 150 ];
    format( szChatString, sizeof( szChatString ), "(%d) %s: %s", playerid, PlayerName( playerid ), text );
    SendClientMessageToAll( GetPlayerColor( playerid ), szChatString );
    return 0;
}

stock PlayerName( playerid )
{
     new pName[ MAX_PLAYER_NAME ];
     GetPlayerName( playerid, pName, sizeof( pName ) );
     return pName;
}
Hope this helps?

Regards,
FalconX
Reply
#4

Quote:
Originally Posted by FalconX
Посмотреть сообщение
I believe you want something like this:-

pawn Код:
public OnPlayerText(playerid, text[])
{
    new szChatString[ 150 ];
    format( szChatString, sizeof( szChatString ), "(%d) %s: %s", playerid, PlayerName( playerid ), text );
    SendClientMessageToAll( GetPlayerColor( playerid ), szChatString );
    return 0;
}

stock PlayerName( playerid )
{
     new pName[ MAX_PLAYER_NAME ];
     GetPlayerName( playerid, pName, sizeof( pName ) );
     return pName;
}
Hope this helps?

Regards,
FalconX
Both script are working fine thanks. But im just confused whats the difference between you and newbienoob script?
Reply
#5

Quote:
Originally Posted by kbalor
Посмотреть сообщение
Both script are working fine thanks. But im just confused whats the difference between you and newbienoob script?
newbienoob - SendPlayerMessageToAll

FalconX - SendClientMessageToAll
Reply
#6

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
newbienoob - SendPlayerMessageToAll

FalconX - SendClientMessageToAll
then what is better??
Reply
#7

Not much difference ...
Reply
#8

hey cAN someone put this in pastebin because when i copy paste comes out in one line pleaseeeeeeeee?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)