08.01.2013, 14:17
(
Последний раз редактировалось Kuddy; 09.01.2013 в 12:46.
)
Kuddy's Anti Car Spam
A algum tempo eu havia postado o Koprotect v1, eu nгo tinha muito conhecimento, tal qual ficou muito zuado.
Refiz tudo, ele ficou 10 vezes mais eficiente e nгo buga. Agora com apenas 1 carro puxado ele jб detecta o hack.
Por que usar o Kuddy's Anti Car Spam?
> Este й um dos mais confiбveis e mais otimizados anti car spams jб feitos, foi amplamente testado por membros da Kz e fomos "calibrando" ele para o melhor desempenho.
Previni:
A maioria dos mods relacionados a multiplos carros, entre eles:
- God of Cars
- Cars Follow
- Rainbow Cars
- Cars Grabber
Download:
pawn Код:
// Kuddy's Anti Car Spam
#include <a_samp>
new FloodControl[MAX_PLAYERS],
gb_as@con[MAX_PLAYERS] = {true, ...},
gi_as@non[MAX_PLAYERS],
gi_as@car[MAX_PLAYERS];
public OnFilterScriptInit()
{
for(new i; i < MAX_PLAYERS; i ++)
{
if(!IsPlayerConnected(i)) continue;
else SetTimerEx("decon", 3000, false, "d", i);
}
return 1;
}
public OnPlayerConnect(playerid)
{
gb_as@con[playerid] = true;
gi_as@non[playerid] = 0;
gi_as@car[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
gb_as@con=true;
SetTimerEx("decon", 3000, false, "d", playerid);
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(gb_as@con[playerid]) return 1;
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetTickCount() - 600 < FloodControl[playerid]) PunirSpam(playerid);
FloodControl[playerid] = GetTickCount();
gi_as@non[playerid] = 1;
gi_as@car[playerid] = GetPlayerVehicleID(playerid);
}
else
{
if(GetTickCount() - 600 < FloodControl[playerid]) PunirSpam(playerid);
FloodControl[playerid] = GetTickCount();
gi_as@non[playerid] = 0;
}
return 1;
}
forward decon(playerid);
public decon(playerid) return gb_as@con[playerid] = false, 0x1;
public OnPlayerUpdate(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return 1;
if(gi_as@non[playerid] != 0)
{
if(gi_as@car[playerid] != GetPlayerVehicleID(playerid)) PunirSpam(playerid);
}
return 1;
}
PunirSpam(playerid)
{
SendClientMessage(playerid, 0xFFFFFFFF, "[Kunni-Protector] {FFFFFF}Vocк foi banido por Car Spam.");
SendClientMessage(playerid, 0xFFFFFFFF, "[Kunni-Protector] {FFFFFF}Caso vocк seja inocente, reporte o bug em nosso forum.");
// Puniзгo:
BanEx(playerid, "Car Spam[K]");
return 1;
}