small issue with duplicate text
#1

Hiya guys..

Anything that is typed in game apart from commands seems to come up in white above it for example..

Hey
Tyrone_Smack: Hey
Hey man! How are you?
Bugsy_Boo: How are you?

Why is this happening?

+Rep for problem solved
Reply
#2

Give us your OnPlayerText callback...
Reply
#3

Is this what you need?

public OnPlayerText(playerid,text[])
{
if((GetTickCount() - GetPVarInt(playerid, "AntiSpam")) > 1)
{
SendClientMessageToAll(-1, text);
SetPVarInt(playerid, "AntiSpam", GetTickCount());
}
else
{
SendClientMessage(playerid, -1, "You must wait 10 seconds before using another Command!");
}
if(text[0] == '#')
{
new string[128]; GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[Team Radio] %s: %s", string, text[1]);
printf("%s", string);

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}

return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
Reply
#4

bump-

any ideas?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)