Jump to content

Anti-Hack ( +10 anti hacks )


InceMan

Recommended Posts

 

- Acest Anti-hack a fost creat de mine  si contine:
 

1. Anti-High Ping (300) ;
2. Anti-Jetpack ;
3. Anti-Money Hack ;
4. Anti-Weapon Hack ; Weapon Blocker ;
5. Anti-Health Hack ;
6. Anti-Armour Hack ;
7. Anti-Vehicle Speed Hack ;
8. Anti-Command Spam ;
9. Anti-Fly Car ;
10. Anti C-BUG System ;


Pentru download [IN ROMANA DESIGUR] :

http://www.solidfiles.com/d/f8ce0c3f8a/Anti.pwn -> PWN, doar compilati !


Cod:
 

/*

				ANTI-SYSTEM 
				
				
1. Anti-High Ping (300) ;
2. Anti-Jetpack ;
3. Anti-Money Hack ;
4. Anti-Weapon Hack ; Weapon Blocker ;
5. Anti-Health Hack ;
6. Anti-Armour Hack ;
7. Anti-Vehicle Speed Hack ;
8. Anti-Command Spam ;
9. Anti-Fly Car ;
10. Anti C-BUG System ;

*/


//------------------------------------------------------------------------------
#include <a_samp>
//------------------------------------------------------------------------------
forward PingChecker();
forward AntiJetpack();
forward GivePlayerMoneyEx(playerid,ammount);
forward CheckMoney();
//------------------------------------------------------------------------------
new bool:PingChecked[MAX_PLAYERS];
new OldMoney[MAX_PLAYERS];
new NewMoney[MAX_PLAYERS];
new Float:pHealth, Float:pArmour;
//------------------------------------------------------------------------------

public OnGameModeInit()
{
    SetTimer("PingChecker", 60000, true);
    SetTimer("CheckMoney",5000,true);
	return 1;
}

public PingChecker()
{
    for(new i;i < MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerPing(i) > 300 && PingChecked[i] == false) 
            {
                SendClientMessage(i, -1, "[SERVER]: {15FF00}Ai fost prins cu Ping mare. Rezolva-l, sau vei primi kick !");
                PingChecked[i] = true;
            }
            if(GetPlayerPing(i) > 300 && PingChecked[i] == true) 
            {
                new pName[MAX_PLAYER_NAME] , string[MAX_PLAYER_NAME*2];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "{FF0000}[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdmBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Ping-Mare", pName);
                SendClientMessageToAll(-1, string);
                SendClientMessage(i, -1, "{FF0000}[SERVER]: {FFCC33}Ai primit kick de la AdmBot || {FFFF00}Motiv: {15FF00}Ping Mare !");
                Kick(i);
            }
        }
    }
    return 1;
}

public AntiJetpack()
{
    new playerid;
    if (GetPlayerSpecialAction(playerid) == 2)
    {
        new string[128],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string),"{FF0000}[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdmBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Jetpack",name);
        SendClientMessageToAll(-1,string);
        Kick(playerid);
    }
}

public GivePlayerMoneyEx(playerid,ammount)
{
      OldMoney[playerid] = GetPlayerMoney(playerid);
      NewMoney[playerid] = ammount;
      GivePlayerMoney(playerid,ammount);

      return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE && ForbiddenWeap(playerid) && !IsPlayerAdmin(playerid))
    {
        new pname[MAX_PLAYER_NAME];
        new string[124];
        GetPlayerName(playerid, pname, sizeof(pname));
        format(string, sizeof(string), "[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdminBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Hack de arme !", pname);
        SendClientMessageToAll(-1,string);
        print(string);
        SetTimerEx("KickTimer", 10, false, "i", playerid);
        BanEx(playerid,string);
        return 1;
	}
	if(pHealth >= 100.1)
	{
	    Kick(playerid);
	}
	if(pArmour >= 100.1)
	{
	    Kick(playerid);
	}
    return 0;
}

public CheckMoney()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerMoney(i) > NewMoney[i])
            {
                ResetPlayerMoney(i);
                GivePlayerMoney(i,OldMoney[i]);
            }
		}
    }
    return 1;
}

public OnPlayerText(playerid, text[])
{
   new lol = GetTickCount();
   if(GetTickCount() - lol < 3000)
   {
    SendClientMessage(playerid,-1,"{FF0000}[SERVER]: {15FF00}Ai nevoie de 3 secunde, inainte sa folosesti alta comanda !");
   }
   return 1;
}

stock ForbiddenWeap(playerid)
{
    new wp = GetPlayerWeapon(playerid);
    if( wp == 38 || wp == 37 || wp == 36 || wp == 35)
    {
        return true;
    }
    return false;
}

stock GetVehicleVelocityVehicle(vehicle)
{
    new Float:Velocity[3], output[80];
	GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
	if(Velocity >= 500)
	{
		Kick(playerid);
	}
}

forward OnPlayerCBug(playerid);
public OnPlayerCBug(playerid)
{
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    new str2[128];
    new string[128];
    format(str2, sizeof(str2), "{FF0000}[SERVER]: {15FF00}%s a primit kick de la {FF0000}AdmBot ! || {FFFF00}Motiv: {15FF00}C-BUG", playername);
    new Float:Health; GetPlayerHealth(playerid,Health); SetPlayerHealth(playerid,Health-10);
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    SetPlayerPos(playerid, x, y, z+15);
    PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
    SendClientMessageToAll(-1, string);
	Kick(playerid);
    return 1;
  • Like 1

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

Intrebare, esti sigur ca merge? Cel putin antijetpackul, pentru ca nu vad unde e chemata functia, iar playerid-u va fi mereu 0 pentru ca mereu va fi initializat 0 , trebuie sa ii pasezi id-u jucatorului, eventual sa o chemi intr-un timer.

De preferabil SetTimerEx la spawnarea jucatorului (ii atribui desigur un id ca sa distrugi timerul la deconectarea jucatorului).

Asta doar o mica observatie.

Edit:Ceva de genul 

Asta sa fie global:

new TimerJetpack[MAX_PLAYERS];
OnPlayerSpawn(playerid)
{
	TimerJetpack[playerid] = SetTimerEx("AntiJetpack", 1000, true, "i",playerid);
	return 1;
}
forward AntiJetpack(playerid);
public AntiJetpack(playerid)
{
    if (GetPlayerSpecialAction(playerid) == 2)
    {
        new string[128],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string),"{FF0000}[SERVER]: {FFCC33}%s {15FF00}a primit kick de la {FF0000}AdmBot ! {FFFFFF}|| {FFFF00}Motiv: {15FF00}Jetpack",name);
        SendClientMessageToAll(-1,string);
        Kick(playerid);
    }
}
OnPlayerDisconnect(playerid)
{
	KillTimer(TimerJetpack[playerid]);
	return 1;
}

 

Edited by Banditul
Amu am intrat pe pc
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.