Problem with SendClientMessage
#1

Why does my name do not show in the text?
%s should be my Name, and after them a text...

pawn Код:
if(dialogid == Chat){
        if(listitem == 0){
        new string[128];
        new aname[MAX_PLAYER_NAME];
        format(string, sizeof(string), "[%s]:text",aname);
        SendClientMessageToAll(0x0ffffff, string);

Reply
#2

Try this

pawn Код:
if(dialogid == Chat)
{
    if(listitem == 0)
    {
        new string[128];
        new aname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, aname, sizeof(aname));
        format(string, sizeof(string), "[%s]:text",aname);
        SendClientMessageToAll(0x0ffffff, string);
    }
}
Reply
#3

I'm thank you
its works.
Reply
#4

No Problem You just forgot the

pawn Код:
GetPlayerName(...);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)