Function OnPlayerText(playerid, text[])
{
new giver[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new tmp[256];
new string[256];
new giveplayerid;
GetPlayerName(playerid,sendername,sizeof(sendername));
//SetPlayerChatBubble(playerid, text, 0xFF0000FF, 20.0, 10000);
/*TextSpams[playerid]++;
if(TextSpams[playerid] >= 5 && PlayerInfo[playerid][pAdmin] == 0)
{
format(string, sizeof(string), " %s wurde von %s gekickt! (GRUND: Spam)",sendername,M_Bot_BOT_NAME);
SendClientMessageToAll(M_BOT_COLOR, string);
Kick(playerid);
return 0;
}*/
//////////////////////////////////////////////////////////////////
//////////////////// AUS M-BOT ///////////////////////////////////
new lastidx = (strlen(text) - 1);
if(text[lastidx] == '.')
text[lastidx] = ' ';
new countit = 0;
for(new x=0; x<strlen(text); x++)
{
if(text[x] == '.' && text[x+1] <= '9' && text[x+1] >= '0') // Es wurde ein Punkt und eine Zahl dahinter geschrieben!
{
countit++;
}
else if(text[x] == '.' && text[x+2] <= '9' && text[x+2] >= '0') // Es wurde ein Punkt, Leerzeichen und eine Zahl dahinter geschrieben!
{
countit++;
}
}
if(countit >= 2 && PlayerInfo[playerid][pAdmin] <1) // Dreimal und eine IP wird erkannt
if(strfind(text,"84.201.4.110:9876",true) != 0) // NICHT die TS-IP
if(strfind(text,"84.201.4.110:9876",true) != 0)
{
new textstring[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(textstring,sizeof(textstring)," [ANTI-IP] %s wird verdächtigt eine IP zu verschicken!",name);
SendClientMessageToAdmins(M_BOT_COLOR,textstring);
format(textstring,sizeof(textstring)," [ANTI-IP] %s: %s",name,text);
SendClientMessageToAdmins(M_BOT_COLOR,textstring);
SendClientMessage(playerid,M_BOT_COLOR," [ANTI-IP] Wir dulden kein Abwerben bzw. Serverwerbungen!");
SendClientMessage(playerid,M_BOT_COLOR," [ANTI-IP] Achtung: Gebe es nicht noch einmal ein!");
M_Bot[playerid][PIPWarns]++;
if(M_Bot[playerid][PIPWarns] >= 3)
{
format(textstring,sizeof(textstring)," [ANTI-IP] %s wurde von %s gebannt! (GRUND: Verdacht auf Abwerben)",name,M_Bot_BOT_NAME);
SendClientMessageToAll(M_BOT_COLOR,textstring);
BanEx(playerid,"Abwerben");
}
return 0;
}
for(new w=0; w<sizeof(BadWords); w++)
{
if(!strfind(text,BadWords[w],true))
{
M_Bot[playerid][PBadWordWarns]++;
if(M_Bot[playerid][PBadWordWarns] >= 3)
{
new textstring[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(textstring,sizeof(textstring)," %s wurde von %s gekickt! (GRUND: 3 BadWord-Warnungen)",name,M_Bot_BOT_NAME);
SendClientMessageToAll(M_BOT_COLOR,textstring);
M_Log(textstring);
M_Kick(playerid);
}
else
{
new textstring[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(textstring,sizeof(textstring)," Du hast nun %d/3 Warnungen, bei 3 wirst du gekickt!",M_Bot[playerid][PBadWordWarns]);
SendClientMessage(playerid,M_BOT_COLOR,textstring);
format(textstring,sizeof(textstring)," %s hat %d/3 BadWord-Warnungen",name,M_Bot[playerid][PBadWordWarns]);
GameTextForPlayer(playerid,"~r~Keine Beleidigungen!",4000,3);
}
return 0;
}
}
//////////////////// AUS M-BOT ///////////////////////////////////
//////////////////////////////////////////////////////////////////
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nichts schreiben, da dich ein Admin gemutet hat!");
return 0;
}
if(PlayerInfo[playerid][pTot] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst reden da du under der Erde liegst!");
return 0;
}
if(PlayerInfo[playerid][pMauled] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du hast ein Mundtape!");
return 0;
}
if(SelectChar[playerid] == 255)
{
new idx;
tmp = strtok(text, idx);
if ((strcmp("weiter", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("weiter")))
{
switch (SelectCharID[playerid])
{
case 1: // LSPD
{
if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, JoinPed[0][0]); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = JoinPed[0][0]; }
else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, JoinPed[1][0]); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = JoinPed[1][0]; }
else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, JoinPed[2][0]); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = JoinPed[2][0]; }
else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, JoinPed[3][0]); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = JoinPed[3][0]; }
else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, JoinPed[4][0]); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = JoinPed[4][0]; }
else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, JoinPed[5][0]); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = JoinPed[5][0]; }
else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, JoinPed[6][0]); SelectCharPlace[playerid] = 8; ChosenSkin[playerid] = JoinPed[6][0]; }
else if(SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid, JoinPed[7][0]); SelectCharPlace[playerid] = 9; ChosenSkin[playerid] = JoinPed[7][0]; }
else if(SelectCharPlace[playerid] == 9) { SetPlayerSkin(playerid, JoinPed[8][0]); SelectCharPlace[playerid] = 10; ChosenSkin[playerid] = JoinPed[8][0]; }
else if(SelectCharPlace[playerid] == 10) { SetPlayerSkin(playerid, JoinPed[9][0]); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = JoinPed[9][0]; }