Sendername Twice in OOC chat? - 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)
+--- Thread: Sendername Twice in OOC chat? (
/showthread.php?tid=416473)
Sendername Twice in OOC chat? -
MrSnapp - 17.02.2013
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);
}
Re: Sendername Twice in OOC chat? -
iManakoss - 17.02.2013
nvm.
Re: Sendername Twice in OOC chat? -
reckst4r - 17.02.2013
The error is not in the code above. Where is it located? Is it a command?
Re: Sendername Twice in OOC chat? -
jessejanssen - 17.02.2013
Please show us the complete /o command.
Best regards,
Jesse
Re: Sendername Twice in OOC chat? -
Mean - 17.02.2013
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.