13.01.2013, 14:56
I dont know how this happend but when today it started to show the ic chat from everyonne who is far away
public OnPlayerText(playerid, text[])
{
// Anti Adv
if(AntiAdv(playerid, text)) return 0;
// The Rest
new string[128], ircMsg[128];
format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, RPN(playerid), text);
IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
// Normal Calling
if(BeingCalled[playerid] == 2 || Calling[playerid] == 2 || Call911[playerid])
{
if(strlen(PlayerInfo[playerid][pAccent])) format(string, sizeof(string), "[Cellphone] %s: [%s Accent] %s", RPN(playerid), PlayerInfo[playerid][pAccent], text);
else format(string, sizeof(string), "[Cellphone] %s: %s", RPN(playerid), text);
if(!Call911[playerid])
{
if(BeingCalled[playerid] == 2) SendClientMessage(Caller[playerid], COLOR_YELLOW, string);
else if(Calling[playerid] == 2) SendClientMessage(Called[playerid], COLOR_YELLOW, string);
}
}
else if(Live[playerid])
{
if(IsNewsVehicle(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "** [Live News]: %s: %s", RPN(playerid), text);
SendClientMessageToAll(COLOR_LIGHTGREEN, string);
format(ircMsg, sizeof(ircMsg), "3[Live News] %s(%d): %s", RPN(playerid), playerid, text);
IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
}
}
else
{
if(strlen(PlayerInfo[playerid][pAccent])) format(string, sizeof(string), "%s says: [%s Accent] %s", RPN(playerid), PlayerInfo[playerid][pAccent], text);
else format(string, sizeof(string), "%s says: %s", RPN(playerid), text);
}
SendNearbyMessage(playerid, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
Log("logs/chat.log", string);
// 911
if(Calling[playerid] && Call911[playerid])
{
if(Call911[playerid] == 1)
{
format(D911[playerid], 12, "%s", text);
Call911[playerid] = 2;
SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: What is your current location?");
}
else if(Call911[playerid] == 2)
{
Call911[playerid] = 0;
Calling[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "[Cellphone]: Alright, we have received your emergency call and a unit will be there shortly.");
SendClientMessage(Caller[playerid], COLOR_ORANGE, " They hungup the line.");
format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF}We have received an emergency call from the phone number %d (( /track %d ))", PlayerInfo[playerid][pCellphone], playerid);
SendCopMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF}We have received an emergency call from the phone number %d (( /track %d ))", PlayerInfo[playerid][pCellphone], playerid);
SendFDMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Dispatch: {FFFFFF}We have received an emergency call from the phone number %d (( /track %d ))", PlayerInfo[playerid][pCellphone], playerid);
SendSoldierMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Emergency: {FFFFFF}%s", D911[playerid]);
SendCopMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Emergency: {FFFFFF}%s", D911[playerid]);
SendFDMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Emergency: {FFFFFF}%s", D911[playerid]);
SendSoldierMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Location: {FFFFFF}%s", text);
SendCopMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Location: {FFFFFF}%s", text);
SendFDMessage(COLOR_WHITE, string);
format(string, sizeof(string), "{2641FE}Location: {FFFFFF}%s", text);
SendSoldierMessage(COLOR_WHITE, string);
format(D911[playerid], 128, "");
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
}
}
/*format(OldSpamChat[playerid], 128, "%s", NewSpamChat[playerid]);
format(NewSpamChat[playerid], 128, "%s", text);
if(strlen(OldSpamChat[playerid]) > 0 && strlen(NewSpamChat[playerid]) > 0)
{
if(!strcmp(OldSpamChat[playerid], NewSpamChat[playerid], false))
{
ChatSpamCount[playerid] ++;
if(ChatSpamCount[playerid] >= 8)
{
format(string, sizeof(string), "AdmCmd: %s has been autokicked, reason: Spam", RPN(playerid));
SendClientMessageToAll(COLOR_LIGHTRED, string);
ChatSpamCount[playerid] = 0;
Kick(playerid);
}
}
else
{
ChatSpamCount[playerid] = 0;
}
}*/
return 0;