27.04.2014, 08:31
ta dando warnings.....
Anti_hack
Anti_hack
pawn Код:
#include <a_samp>
#define VERMELHO 0xFF0000AA
#define CHECKING_INT 1000
#define MAXPING 300
static
iPlayerChatTime[MAX_PLAYERS];
new msg[281];
new
vehicleTime[MAX_PLAYERS],
lastVehicle[MAX_PLAYERS]
;
forward CheckMoney();
new AntiNomeBot[][] =
{
"con.","com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7",
"lpt8","lpt9","nul","clock$","aux","prn","con","Carl","Rocky","Pepe","Arnoldo","SgtPepper","Pepsi""Pepno","Azucar",
"Vino_Toro","Zoquete","Pacman","Batman","AquilesBrinco","Manfrey","Sopapeala","Papirola","Sony","[ViP]Labrik","Justin_Bieber",
"[MT]Lavis","Gil_Henrique","Server_Lixo","Justin_Biba","Justin_Viadinho","Advanced_Lixo"
};
public OnFilterScriptInit()
{
print("\n- Ligando FS -");
return 1;
}
public OnFilterScriptExit()
{
print("\n- Desligando FS -");
return 1;
}
main()
{
print("\n----------------------------------");
print("----------------------------------\n");
}
public OnPlayerConnect(playerid)
{
new nomedocara3[MAX_PLAYER_NAME];
GetPlayerName(playerid, nomedocara3, sizeof(nomedocara3));
for(new n; n < sizeof(AntiNomeBot); ++n)
{
if(!strcmp(nomedocara3, AntiNomeBot[n], true))
{
Kick(playerid, "NOOOB , Nome Impropio.");
return 1;
}
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid))
{
return 0;
}
iPlayerChatTime[playerid] = GetTickCount();
return 0;
}
public OnPlayerUpdate(playerid)
{
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Hacker Jetpack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
else if(GetPlayerWeapon(playerid) == 35)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
else if(GetPlayerWeapon(playerid) == 36)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
else if(GetPlayerWeapon(playerid) == 37)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
else if(GetPlayerWeapon(playerid) == 38)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
else if(GetPlayerWeapon(playerid) == 39)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
else if(GetPlayerWeapon(playerid) == 40)
{
new pname[24]; GetPlayerName(playerid, pname, sizeof(pname));
format(msg, sizeof(msg), "[Atenзao]Player %s (id:%i) Foi Kickado Pelo Administrador Bot .[Motivo: Weapon Hack]", pname, playerid);
SendClientMessageToAll(0xFF0000AA, msg);
Kick(playerid);
}
new vehicleID = GetPlayerVehicleID(playerid);
if(lastVehicle[playerid] != vehicleID)
{
lastVehicle[playerid] = vehicleID;
if(GetVehicleModel(vehicleID))
{
CallRemoteFunction("OnPlayerChangeVehicle","ii", playerid, vehicleID);
}
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
new pip[16];
for(new i=0; i<MAX_PLAYERS; i++)
{
GetPlayerIp(i, pip, sizeof(pip));
if(!strcmp(ip, pip, true))
{
Kick(i, "/RCON LOGIN");
}
}
return 1;
}
stock GivePlayerCash(playerid, quantia)
{
GivePlayerMoney(playerid, quantia);
SetPVarInt(playerid, "Dinheiro", GetPlayerMoney(playerid));
}
public CheckMoney()
{
new strmsg[128], pName[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerMoney(i) > GetPVarInt(i, "Dinheiro"))
{
GetPlayerName(i, pName, sizeof(pName));
format(strmsg, sizeof(strmsg), "[WS Money Hacker]: O Player %s foi Kickado por fazer money hacker !", pName);
SendClientMessageToAll(0xE3E3E3FF, strmsg);
Kick(i);
}
}
}
forward OnPlayerChangeVehicle(playerid, vehicleid);
public OnPlayerChangeVehicle(playerid, vehicleid)
{
#pragma unused vehicleid
if((GetTickCount() - vehicleTime[playerid]) < 250)
{
Kick(playerid);
}
vehicleTime[playerid] = GetTickCount();
}
stock checaDivulguer(playerid, texto[]) {
new ccount[3];
for(new i; i < strlen(texto); ++i) switch(texto[i]) {
case '0' .. '9': ccount[0]++; case '.': ccount[1]++; case ':': ccount[2]++;
}
new string[128];
if(ccount[0] > 8 && ccount[1] >= 3 && ccount[2] >= 1) {
format(string,sizeof(string),"[ antiDivulgadores ] %s foi Kickado por divulgar.", rNome(playerid));
Kick(playerid, texto);
SendClientMessageToAll(string, -1);
}
return 1;
}
stock rNome(playerid) {
new nome[24]; GetPlayerName(playerid, nome, 24); return nome;
}
forward CheckPing(playerid);
public CheckPing(playerid)
{
if(GetPlayerPing(playerid) > MAXPING)
{
SendClientMessage(playerid,-1,"Vocк foi kickado do Servidor, pois seu ping ultrapassou o limite de 300");
Kick(playerid);
}
return true;
}
stock IsPlayerFlooding(playerid)
{
if(GetTickCount() - iPlayerChatTime[playerid] < 2000)
return 1;
return 0;
}
pawn Код:
C:\Users\Pedro\Desktop\PT.pwn(50) : warning 202: number of arguments does not match definition
C:\Users\Pedro\Desktop\PT.pwn(54) : warning 217: loose indentation
C:\Users\Pedro\Desktop\PT.pwn(62) : warning 217: loose indentation
C:\Users\Pedro\Desktop\PT.pwn(119) : warning 217: loose indentation
C:\Users\Pedro\Desktop\PT.pwn(142) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Warnings.