Sendername Twice in OOC chat?
#1

Hi! When I type /o for OOC chat for my RP server it Lists the senders name twice. EG: 'Bob_Bobby: ((Bob_Bobby MESSAGE))'. How do I make it that the first Bob Bobby is removed to leave only the brackets and its contents?

Code:
pawn Код:
if(PlayerInfo[playerid][pAdmin] == 0)
            {
                format(string, sizeof(string), "(( %s %s ))", sendername, result);
            }
            else
            {
                format(string, sizeof(string), "[[ %s %s ]]", sendername, result);
            }
            SendPlayerMessageToAll(playerid, string);
            new year,month,day;
            getdate(year, month, day);
            new hour, minute, second;
            gettime(hour,minute,second);
            format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (OOC): (%s)",day,month,year,hour,minute,second, sendername, result);
            PublicLog(string);
        }
Reply
#2

nvm.
Reply
#3

The error is not in the code above. Where is it located? Is it a command?
Reply
#4

Please show us the complete /o command.

Best regards,
Jesse
Reply
#5

pawn Код:
if(PlayerInfo[playerid][pAdmin] == 0)
    format(string, sizeof(string), "(( %s %s ))", sendername, result);
else
    format(string, sizeof(string), "[[ %s %s ]]", sendername, result);
SendClientMessageToAll(-1, string);
new year,month,day;
getdate(year, month, day);
new hour, minute, second;
gettime(hour,minute,second);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (OOC): (%s)",day,month,year,hour,minute,second, sendername, result);
PublicLog(string);
SendPlayerMessage automatically puts a name in, so you need to use SendCLIENTMessage.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)