Double chat
#7

What MP2 said is entirely correct. Returning 1 sends the traditional samp chat. Wait, why would you make your own format function? You are not defining the string. This is how my OnPlayerText code looks. Try to change your stragedy in light of seeing mine.

pawn Код:
public OnPlayerText(playerid, text[])
{
    new pname[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, pname, sizeof(pname));
    strreplace(pname,'_',' ');
    switch(pInfo[playerid][pAccent])
    {
        case 0:format(str, sizeof(str), "%s says: %s", pname, text);
        case 1:format(str, sizeof(str), "[American Accent] %s says: %s", pname, text);
        case 2:format(str, sizeof(str), "[Mexican Accent] %s says: %s", pname, text);
        case 3:format(str, sizeof(str), "[Russian Accent] %s says: %s", pname, text);
    }
    ProxDetector(30.0, playerid, str, COLOR_WHITE);
    new lstring[254];
    new File:chatlog=fopen(LOG,io_append);
    format(lstring,254,"[chat][local][%s]: %s\r\n",pname,text);
    fwrite(chatlog,lstring);
    fclose(chatlog);
    return 0;
}
Reply


Messages In This Thread
Double chat - by falor - 08.03.2012, 17:42
Re: Double chat - by [XST]O_x - 08.03.2012, 17:46
Re : Double chat - by falor - 08.03.2012, 17:52
Re : Double chat - by falor - 08.03.2012, 17:58
Re: Double chat - by MP2 - 08.03.2012, 18:34
Re : Double chat - by falor - 08.03.2012, 18:51
Re: Double chat - by ReneG - 08.03.2012, 21:35
Re : Double chat - by falor - 09.03.2012, 10:40
Re: Re : Double chat - by [XST]O_x - 10.03.2012, 10:35

Forum Jump:


Users browsing this thread: 1 Guest(s)