24.06.2010, 17:42
This is what I did. It doesn't work
pawn Код:
forward CarComponentAnti();
pawn Код:
SetTimer("CarComponentAnti",1500,1);
pawn Код:
public CarComponentAnti()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsSpawned[i] == 1)
{
new vehicleid = GetPlayerVehicleID(i);
if(GetVehicleModel(vehicleid) == 601 || GetVehicleModel(vehicleid) == 522 || GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 521 || GetVehicleModel(vehicleid) == 422) {
{
if(GetVehicleComponentInSlot(GetPlayerVehicleID(i), CARMODTYPE_NITRO) != 0) // this car has nitro
{
if(PlayerAdminLevel[i] != 1337) {
new string[256];
GetPlayerName(i, pname, 30);
format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r",pname,i);
SendClientMessageToAll(0xFF7F50AA, string);
SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN DETECTED AS A CHEATER/HACKER");
SendClientMessage(i,COLOR_RED,"YOU HAVE BEEN BANNED FROM THIS SERVER");
SendClientMessage(i,COLOR_RED,"If you think this is a mistake. Visit to appeal this ban");
format(string, sizeof(string), "**(AUTO BAN)** %s(%d) Our Anti-Cheat has detected a hax0r (Nitro Hacker)",pname,i);
printf("%s", string);
if(udb_Exists(PlayerName(i)) && PLAYERLIST_authed[i]) {
dUserSetINT(PlayerName(i)).("nameban",1);
}
SetPlayerInterior(i,10);
SetPlayerPos(i,219.6257,111.2549,999.0156);
SetPlayerFacingAngle(i,2.2339);
SetCameraBehindPlayer(i);
Banning[i] = 1;
SetTimer("BanPlayer",700,0);
}
}
}
}
}
}
}