SA-MP Forums Archive
Problem with SendClientMessage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with SendClientMessage (/showthread.php?tid=135764)



Problem with SendClientMessage - _soad_ - 21.03.2010

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);




Re: Problem with SendClientMessage - Fabio11 - 21.03.2010

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);
    }
}



Re: Problem with SendClientMessage - _soad_ - 21.03.2010

I'm thank you
its works.


Re: Problem with SendClientMessage - Fabio11 - 21.03.2010

No Problem You just forgot the

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