PHP код:
public OnPlayerText(playerid, text[])
{
new string[256];
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(PlayerInfo[playerid][Logged] == 0)
{
SendClientMessage(playerid, Vermelho, "Logue-se antes.");
return 0;
}
if(Mute[playerid] == 1)
{
SendClientMessage(playerid, Vermelho, "|_ ANTI-FLOOD _| Vocк nгo pode falar enquanto estб mudo!");
return 0;
}
if(AFK[playerid] == 1)
{
SendClientMessage(playerid, Vermelho, "{FFFFFF}Para voltar ao jogo digite {00FF00}/on");
return 0;
}
if(NaFaculdade[playerid] == 1)
{
Conversa[playerid] = Conversa[playerid]++;
if(Conversa[playerid] == 3)
{
minutos[playerid] = 0;
NaFaculdade[playerid] = 0;
SpawnPlayer(playerid);
SendClientMessage(playerid, Vermelho, "Vocк conversou muito e foi expulso da biblioteca!");
}
format(string, sizeof(string), "Vocк estб conversando. Vocк recebeu um aviso, agora vocк estб com %d/3 aviso(s).", Conversa[playerid]);
SendClientMessage(playerid, Aviso, string);
return 0;
}
if(GetTickCount() > FloodTimer[playerid])
{
FloodAlert[playerid] = 0;
}
FloodTimer[playerid] = GetTickCount() +TimerFlood;
FloodAlert[playerid]++;
if(FloodAlert[playerid] > 1 && FloodAlert[playerid] < AlertFlood-1)
{
format(string, sizeof(string), "|_ ANTI-FLOOD _| Vocк tem %d/%d avisos.", FloodAlert[playerid], AlertFlood);
SendClientMessage(playerid, Amarelo, string);
}
else if(FloodAlert[playerid] == AlertFlood-1)
{
format(string, sizeof(string), "|_ ANTI-FLOOD _| Vocк tem %d/%d avisos. Mais um e vocк serб kickado.", FloodAlert[playerid], AlertFlood);
SendClientMessage(playerid, Amarelo, string);
}
else if(FloodAlert[playerid] == AlertFlood)
{
format(string, sizeof(string), "O(A) jogador(a) %s foi kickado(a) por BPSBot. Motivo: Flood Chat", GetPlayerNameEx(playerid));
SendClientMessageToAll(Amarelo, string);
KickLog(string);
Kick(playerid);
return 0;
}
if(!(pAdmin[playerid] >= 1))
{
for(new p = 0; p < sizeof Palavroes; p++)
{
new fp = strfind(text, Palavroes[p], true);
while(fp != -1)
{
for(new i = 0; i < strlen(Palavroes[p]); i++)
{
text[fp + i] = '_';
}
fp = strfind(text, Palavroes[p], true);
}
}
if(VBIsIP(text))
{
SendClientMessage(playerid, Amarelo, "|_ ANTI-SPAM _| Vocк nгo pode fazer spam no servidor.");
return 0;
}
}
if(InCall[playerid] == 1)
{
format(str3, 128, " [Celular] %s (%d): %s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessage(gc, BLUEWHITE, str3);
format(str3, 128, " [Celular] %s (%d): %s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessage(sender, BLUEWHITE, str3);
return 0;
}
if(dini_Int(file, "Entrevista") == 1)
{
format(string,sizeof(string), "[»] O entrevistado %s responde: %s", aname, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(dini_Int(file, "Entrevista") == 2)
{
format(string,sizeof(string), "[»] O reporter %s pergunta: %s", aname, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
SetPlayerChatBubble(playerid, text, Azul, 50.0, 10000);
if(pAdmin[playerid] == 1)
{
format(string, sizeof(string), "%s [ID: %d] :::. {F34F00}Auxiliar {FFFFFF}.:::™ {00FF80}%s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(pAdmin[playerid] == 2)
{
format(string, sizeof(string), "%s [ID: %d] :::. {6A5ACD}Moderador {FFFFFF}.:::™ {00FF80}%s", GetPlayerNameEx(playerid), playerid, text);
SendPlayerMessageToAll(playerid,string);
return 0;
}
if(pAdmin[playerid] == 3)
{
format(string, sizeof(string), "%s [ID: %d] :::. {00FF80}Master {FFFFFF}.:::™ {00FF80}%s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(pAdmin[playerid] == 4)
{
format(string, sizeof(string), "%s [ID: %d] :::. {D7DF01}Anti-Cheat {FFFFFF}.:::™ %s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(pAdmin[playerid] ==5)
{
format(string, sizeof(string), "%s [ID: %d] :::. {00FFFF}Coord {FFFFFF}.:::™ %s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(pAdmin[playerid] == 6)
{
format(string, sizeof(string), "[ID: %d] :::. {01DF01}Sub-Dono {FFFFFF}.:::™ {045FB4}%s", playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(pAdmin[playerid] == 7)
{
format(string, sizeof(string), "%s [ID: %d] :::. {FFCA86}Scripter {FFFFFF}.:::™ %s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(pAdmin[playerid] == 8)
{
format(string, sizeof(string), "%s [ID: %d] :::. {1602F4}Dono {FFFFFF}.:::™ {00FF80}%s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(vip[playerid] == 1)
{
format(string, sizeof(string), "%s [ID: %d] {FF0000}[PREMIUM]: {FF8000}%s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
return 0;
}
if(Chatlb == 1)
{
format(string, sizeof(string), "%s [{DF0101}ID: {2E9AFE}%d{FFFFFF}] %s", GetPlayerNameEx(playerid), playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid),string);
}
else
{
ChatProximo(playerid, text);
}
return 0;
}