Posts: 337
Threads: 86
Joined: Dec 2011
Reputation:
0
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
Posts: 281
Threads: 1
Joined: Sep 2012
Reputation:
0
Give us your OnPlayerText callback...
Posts: 337
Threads: 86
Joined: Dec 2011
Reputation:
0
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;
}