28.01.2013, 20:41
Код:
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 0;
}
Maybe someone can help.. In chat it shows like
Код:
ha Nick: ha

