17.02.2012, 15:26
Hola a todos .
Tengo un problema , instale el anti-spam de grove4l en mi gamemode y ahora aveces cuando hacen spam,(yo hize probandolo con unos amigos)se me bugea el chat ic y se lee a millas lo que uno dice. yo creo que es por el anti-spam porque antes no sucedia , igual dejo mi public aver si podrian darme una mano
[spoiler]
[/spoiler]
Tengo un problema , instale el anti-spam de grove4l en mi gamemode y ahora aveces cuando hacen spam,(yo hize probandolo con unos amigos)se me bugea el chat ic y se lee a millas lo que uno dice. yo creo que es por el anti-spam porque antes no sucedia , igual dejo mi public aver si podrian darme una mano
[spoiler]
pawn Код:
public OnPlayerText(playerid, text[])
{
new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new tmp[256]; new string[120];
if(PlayerInfo[playerid][pMuted] == 1) { Message(playerid, COLOR_DEPARTAMENT, "No Puedes hablar,has sido silenciado"); return 0; }
{
if(DetectarSpam(text))
{
MensajeError(playerid,"No esta permitido el SPAM."); //Mensaje al del SPAM
SendClientMessage(playerid,0xFF0000FF,"Los administradores fueron advertidos."); //Mensaje al del SPAM
format(string, sizeof(string), "[ANTI-SPAM] Usuario %s[ID:%i] Posible Spamer.",NombreEx(playerid),playerid); //Mensaje poniendo el Noombre e ID del jugador SPAM.
Adm_Info(COLOR_GREEN, string, 1); //Manda el mensaje anterior a los Administradores.
format(string, sizeof(string), "> Texto Enviado: %s <",text); //Mensaje poniendo el texto que mando el del SPAM
Adm_Info(COLOR_GREEN, string, 1); //Manda el mensaje anterior a los Administradores.
return 0; //Retorna "0" para que el mensaje con el SPAM no salga.
}
}
if(MatrimonioCerem[playerid] > 0)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("yes", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("yes")))
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "Sacerdote: %s toma a %s como su esposa? (Use 'yes', para aceptarla como tu esposa).", giveplayer,sendername);
Message(GotProposedBy[playerid], COLOR_WHITE, string);
MatrimonioCerem[GotProposedBy[playerid]] = 1;
MatrimonioCerem[playerid] = 0;
GotProposedBy[playerid] = 999;
return 1;
}
else
{
MatrimonioCerem[playerid] = 0;
GotProposedBy[playerid] = 999;
return 0;
}
}
else if(ProposedTo[playerid] < 999)
{
if(IsPlayerConnected(ProposedTo[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Sacerdote: %s y %s los declaro marido y mujer... puedes besar a la novia", sendername, giveplayer);
Message(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Sacerdote: %s y %s los declaro marido y mujer... puedes besar al novio.", giveplayer, sendername);
Message(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Iglesia LS: %s & %s an concurrido en santo matrimonio.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
{
format(string, sizeof(string), "Sacerdote: %s y %s los declaro marido y hombre... puedes besar a la novio.", sendername, giveplayer);
Message(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Sacerdote: %s y %s los declaro marido y hombre... puedes besar a la novio.", giveplayer, sendername);
Message(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Iglesia LS: gays %s & %s an concurrido en santo matrimonio.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
{
format(string, sizeof(string), "Sacerdote: %s y %s los declaro esposa y mujer... puedes besar a la novia.", sendername, giveplayer);
Message(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Sacerdote: %s y %s los declaro esposa y mujer... puedes besar a la novia.", giveplayer, sendername);
Message(ProposedTo[playerid], COLOR_WHITE, string);
format(string, sizeof(string), "Iglesia LS: lesvianas %s & %s an concurrido en santo matrimonio.", sendername, giveplayer);
OOCNews(COLOR_WHITE, string);
}
MatrimonioCerem[ProposedTo[playerid]] = 0;
MatrimonioCerem[playerid] = 0;
format(string, sizeof(string), "%s", sendername);
strmid(PlayerInfo[ProposedTo[playerid]][pMarriedTo], string, 0, strlen(string), 255);
format(string, sizeof(string), "%s", giveplayer);
strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
GivePlayerMoney(playerid, - 100000);
PlayerInfo[playerid][pMarried] = 1;
PlayerInfo[ProposedTo[playerid]][pMarried] = 1;
PlayerInfo[ProposedTo[playerid]][pPhousekey] = PlayerInfo[playerid][pPhousekey];
ProposedTo[playerid] = 999;
MatrimonioCerem[playerid] = 0; return 1;
} else { MatrimonioCerem[playerid] = 0; ProposedTo[playerid] = 999; return 0;
}
}
}
else
{
if(GotProposedBy[playerid] < 999)
{
if(IsPlayerConnected(GotProposedBy[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You didn't want to Marry %s, no 'yes' was said.",giveplayer);
Message(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s did't want to Marry you, no 'yes' was said.",sendername);
Message(GotProposedBy[playerid], COLOR_YELLOW, string); return 0;
} else { MatrimonioCerem[playerid] = 0; GotProposedBy[playerid] = 999; return 0;
}
}
else if(ProposedTo[playerid] < 999)
{
if(IsPlayerConnected(ProposedTo[playerid]))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You didn't want to Marry %s, no 'yes' was said.",giveplayer);
Message(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "* %s did't want to Marry you, no 'yes' was said.",sendername);
Message(ProposedTo[playerid], COLOR_YELLOW, string); return 0;
} else { MatrimonioCerem[playerid] = 0; ProposedTo[playerid] = 999; return 0;
}
}
}
return 0;
}
if(UsingEctasy[playerid] > 0)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "ЎUna fuerza desconocida te impide hablar!");
return 0;
}
if(TalkingLive[playerid] != 255)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(CNN_Team(playerid))
{
format(string, sizeof(string), "[Entrevista] CNN %s: %s", sendername, text);
OOCNews(COLOR_GREEN, string);
}
else
{
format(string, sizeof(string), "[Entrevista] Live %s: %s", sendername, text);
OOCNews(COLOR_GREEN, string);
}
return 0;
}
if(Mobile[playerid] != 255)
{
new idx;
tmp = strtok(text, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
{
format(string, sizeof(string), "[Telйfono] Dice: %s", text);
}
{
format(string, sizeof(string), "[Telйfono] Dice: %s", text);
}
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
if(Mobile[playerid] == 914)
{
if(!strlen(tmp))
{
Message(playerid, COLOR_DEPARTAMENT, "SAMD: No le entendemos, puede repetirlo?");
return 0;
}
new turner[MAX_PLAYER_NAME];
new wanted[128];
GetPlayerName(playerid, turner, sizeof(turner));
Message(playerid, COLOR_DEPARTAMENT, "SAMD: Hemos alertado todas las unidades en el бrea.");
Message(playerid, COLOR_DEPARTAMENT, "Gracias por informar este insidente");
format(wanted, sizeof(wanted), "SAMD: Todas las unidad: %s",turner);
SendFamilyMessage(3, COLOR_DEPARTAMENT, wanted);
format(wanted, sizeof(wanted), "SAMD: Incidente Reportado: %s",text);
SendFamilyMessage(3, COLOR_DBLUE, wanted);
Message(playerid, COLOR_GRAD2, "Todas las unidados fueron informadas...");
Mobile[playerid] = 255;
return 0;
}
if(Mobile[playerid] == 913)
{
if(!strlen(tmp)) { Message(playerid, COLOR_DEPARTAMENT, "SAPD: No le entendemos, puede repetirlo?"); return 0; }
if ((strcmp("no", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("no")))
{
new turner[MAX_PLAYER_NAME];
new wanted[128];
GetPlayerName(playerid, turner, sizeof(turner));
Message(playerid, COLOR_DBLUE, "Hemos alertado todas las unidades en el бrea.");
Message(playerid, COLOR_DBLUE, "Gracias por informar este insidente/crimen");
format(wanted, sizeof(wanted), "SAPD: Todas las unidades: Reporte: %s",turner);
SendFamilyMessage(1, COLOR_DBLUE, wanted);
format(wanted, sizeof(wanted), "SAPD: Crimen: %s, Sospechoso: Desconocido",PlayerCrime[playerid][pAccusing]);
SendFamilyMessage(1, COLOR_DBLUE, wanted);
Message(playerid, COLOR_GRAD2, "Todas las unidados fueron informadas...");
Mobile[playerid] = 255;
return 0;
}
new badguy;
badguy = ReturnUser(tmp);
if (IsPlayerConnected(badguy))
{
if(badguy != INVALID_PLAYER_ID)
{
if (gTeam[badguy] == 2 || gTeam[badguy] == 1)
{
Message(playerid, COLOR_DBLUE, "Policia: Esto es una lнnea de emergencias");
Message(playerid, COLOR_GRAD2, " Colgaron...");
Mobile[playerid] = 255;
return 0;
}
if (WantedPoints[badguy] > 0)
{
Message(playerid, COLOR_DBLUE, "Policia: Las unidades yб han sido informadas");
Message(playerid, COLOR_DBLUE, "Gracias por informar el crimen");
Message(playerid, COLOR_GRAD2, " Colgaron...");
Mobile[playerid] = 255;
return 0;
}
if (badguy == playerid)
{
Message(playerid, COLOR_DBLUE, "Policia: Esto es una lнnea de emergencias.");
Message(playerid, COLOR_GRAD2, " Colgaron...");
Mobile[playerid] = 255;
return 0;
}
Message(playerid, COLOR_DBLUE, "Policia: las unidades yб han sido informadas");
Message(playerid, COLOR_DBLUE, "Gracias por informar el crimen");
SetPlayerCriminal(badguy,playerid, PlayerCrime[playerid][pAccusing]);
if(WantedPoints[badguy] > 0) { } else { WantedPoints[badguy] += 2; }
Message(playerid, COLOR_GRAD2, " Colgaron...");
Mobile[playerid] = 255;
return 0;
}
return 0;
}
else
{
format(string, sizeof(string), "Policia: estб seguro que el nombre que nos dio es? %s, ((Escribe SI o NO))",tmp);
Message(playerid, COLOR_DBLUE, string);
return 0;
}
}
if(Mobile[playerid] == 912)
{
if(!strlen(tmp))
{
Message(playerid, COLOR_DEPARTAMENT, "Emergencias: Lo sentimos No entendemos");
return 0;
}
strmid(PlayerCrime[playerid][pAccusing], text, 0, strlen(text), 255);
Message(playerid, COLOR_DBLUE, "Policia: Si conoce el nombre delsospechoso digalo o simplemente siga NO.");
Mobile[playerid] = 913;
return 0;
}
if(Mobile[playerid] == 911)
{
if(!strlen(tmp))
{
Message(playerid, COLOR_DEPARTAMENT, "Emergencias: No lo entendemos solo diga, policia o Paramйdico?");
return 0;
}
else if ((strcmp("policia", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("policia")))
{
Message(playerid, COLOR_DEPARTAMENT, "Emergencias: aquн el departamento de LSPD Lo escuchamos.");
Mobile[playerid] = 912;
Message(playerid, COLOR_DBLUE, "comisarнa: Porfavor da un breve informe de lo ocurrido.");
return 0;
}
else if ((strcmp("Paramedico", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("paramedico")))
{
Message(playerid, COLOR_DEPARTAMENT, "Emergencias: aquн el departamento de HGLS Lo escuchamos.");
Mobile[playerid] = 914;
Message(playerid, COLOR_DEPARTAMENT, "Despacho: Porfavor da un breve informe de lo ocurrido.");
return 0;
}
else
{
Message(playerid, COLOR_DEPARTAMENT, "Emergencias: no lo entendemos, solo escoja ґPoliciaґ o ґParamйdicoґ");
return 0;
}
}
if(Mobile[playerid] == 3900)
{
SendFamilyMessage(9, COLOR_GREEN, "Usted Tiene un Nuevo Mensaje:");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "[ID:%d] %s Dice: %s", playerid, sendername, text);
SendFamilyMessage(7, COLOR_GREEN, string);
Message(playerid, COLOR_GREEN, "Estudio LsTv: gracias por la informaciуn !");
Message(playerid, COLOR_GRAD2, " Colgaron...");
Mobile[playerid] = 255;
return 0;
}
if(IsPlayerConnected(Mobile[playerid]))
{
if(Mobile[Mobile[playerid]] == playerid)
{
Message(Mobile[playerid], COLOR_YELLOW,string);
}
}
else
{
Message(playerid, COLOR_YELLOW,"No hay nadie en la lнnea");
}
return 0;
}
if (realchat)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Desconocido Dice: %s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
format(string, sizeof(string), "%s dice: %s", sendername, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.0, 1, 0, 0, 1, 1);
SetTimerEx("PararAnimacion", strlen(text)*500, false, "d", playerid);
return 0;
}
}
return 1;
}

