[Question] Underline removing... -
ZeroTheScyther - 01.04.2014
Hey guys. Working on a RP server and after lot of progress I realized that I didn't really made anything to remove the underline from players' name ... so I made this one really quick but I have a small problem ...
pawn Код:
public OnPlayerText(playerid, text[])
{
if(masked[playerid])
{
new string[128];// This is string what we use.
format(string, sizeof(string), "Strainul %d: %s", maskid[playerid], text); //This is when you are masked and you start to speak
ProxDetector(30.0, playerid, string, -1,0xFFFFFFBB,0xFFFFFFBB,0xFFFFFF77,0xFFFFFF33);
return 0;
}
else
{
new string[128];// This is string what we use.
format(string, sizeof(string), "%s: %s", GetPlayerNameEx(playerid), text); //when you are not masked and you speak
ProxDetector(30.0, playerid, string, -1,0xFFFFFFBB,0xFFFFFFBB,0xFFFFFF77,0xFFFFFF33);
}
return 1;
}
Whenever I chat I get two messages like
pawn Код:
Akira Heartnet: Test!
Akira_Heartnet: Test!
What's wrong?
EDIT: Don't tell me it's because I didn't added
Edit2: Yep ... fixed, I just had to add that return 0; ... Damn' I'm so stupid sometimes ^-^
Re: [Question] Underline removing... -
PrivatioBoni - 01.04.2014
Indeed. You need
otherwise it outputs both the RP chat and the global chat thus giving the illusion that it's sent twice.
Re: [Question] Underline removing... -
LocMax - 01.04.2014
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128];
if(masked[playerid])
{
format(string, sizeof(string), "Strainul %d: %s", maskid[playerid], text); //This is when you are masked and you start to speak
ProxDetector(30.0, playerid, string, -1,0xFFFFFFBB,0xFFFFFFBB,0xFFFFFF77,0xFFFFFF33);
}
else
{
format(string, sizeof(string), "%s: %s", GetPlayerNameEx(playerid), text); //when you are not masked and you speak
ProxDetector(30.0, playerid, string, -1,0xFFFFFFBB,0xFFFFFFBB,0xFFFFFF77,0xFFFFFF33);
}
return 0;
}
or
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128];
if(masked[playerid]) format(string, sizeof(string), "Strainul %d: %s", maskid[playerid], text);
else format(string, sizeof(string), "%s: %s", GetPlayerNameEx(playerid), text); //when you are not masked and you speak
return ProxDetector(30.0, playerid, string, -1,0xFFFFFFBB,0xFFFFFFBB,0xFFFFFF77,0xFFFFFF33), 0;
}