Jump to content
  • 0

Spam Anti-Hack


Viorel

Question

care ar putea sa ma ajute cu o faza ca am bagat un anti-hack si cand scoate unu de exemplu minigun nu imi scrie doar 1 data ca respectivu a luat ban ce ne face un spam ca ne umple ban.cfg [ Si pe linux si pe windows ne face]

Asta este anti-hack

public AntiHack()
{
	new name[24];
	new weapon;
	new gunammo;
	new string[256];
	for (new i = 0; i <MAX_PLAYERS; i++)
	{
	    for (new w = 0; w <MAX_PLAYERS; w++)
	    {
	        GetPlayerWeaponData(i, w, weapon, gunammo);
	        if((weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39) && gunammo > 0)
	        {
		        GetPlayerName(i, name, sizeof(name));
	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames[weapon]);
	            SendClientMessageToAll(COLOR_RED, string);
	            Ban(i);
	            BanLog(string);
			}
		}
	}
	return 1;
}

public JetPackCheck()
{
	for(new i = 0; i <MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
	        {
	            new string[128];
	            new name[24];
	            GetPlayerName(i, name, sizeof(name));
	            format(string, sizeof(string), "[Anti-Hack] %s a fost anat din cauza hack-ului de jetkpack!", name);
	            SendClientMessageToAll(COLOR_RED, string);
	            Ban(i);
	            BanLog(string);
			}
		}
	}
	return 1;
}

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Am modificat () in loc de [] unde am stiut dar uite

D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27563) : error 001: expected token: ";", but found "("
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27612) : error 010: invalid function or declaration
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 028: invalid subscript (not an array or too many subscripts): "GunNames"
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : warning 215: expression has no effect
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 001: expected token: ";", but found "]"
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 029: invalid expression, assumed zero
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : fatal error 107: too many error messages on one line
Liniile sunt astea
new GunNames()][32] = {
	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames(weapon));

Link to comment
Share on other sites

uite sa fiu direct asa numi da error :

new GunNames[][32] = {
	{"Unarmed (Fist)"},
	{"Brass Knuckles"},
	{"Golf Club"},
	{"Night Stick"},
	{"Knife"},
	{"Baseball Bat"},
	{"Shovel"},
	{"Pool Cue"},
	{"Katana"},
	{"Chainsaw"},
	{"Purple Dildo"},
	{"Big White Vibrator"},
	{"Medium White Vibrator"},
	{"Small White Vibrator"},
	{"Flowers"},
	{"Cane"},
	{"Grenade"},
	{"Teargas"},
	{"Molotov"},
	{" "},
	{" "},
	{" "},
	{"Colt 45"},
	{"Silenced Pistol"},
	{"Desert Eagle"},
	{"Normal Shotgun"},
	{"Sawnoff Shotgun"},
	{"Combat Shotgun"},
	{"Micro Uzi (Mac 10)"},
	{"MP5"},
	{"AK47"},
	{"M4"},
	{"Tec9"},
	{"Country Rifle"},
	{"Sniper Rifle"},
	{"Rocket Launcher"},
	{"Heat-Seeking Rocket Launcher"},
	{"Flamethrower"},
	{"Minigun"},
	{"Satchel Charge"},
	{"Detonator"},
	{"Spray Can"},
	{"Fire Extinguisher"},
	{"Camera"},
	{"Night Vision Goggles"},
	{"Infrared Vision Goggles"},
	{"Parachute"},
	{"Fake Pistol"}
};

public AntiHack()
{
	new name[24];
	new weapon;
	new gunammo;
	new string[256];
	for (new i = 0; i <MAX_PLAYERS; i++)
	{
	    for (new w = 0; w <MAX_PLAYERS; w++)
	    {
	        GetPlayerWeaponData(i, w, weapon, gunammo);
	        if((weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39) && gunammo > 0)
	        {
		        GetPlayerName(i, name, sizeof(name));
	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames[weapon]);
	            SendClientMessageToAll(COLOR_RED, string);
	            Ban(i);
	            BanLog(string);
			}
		}
	}
	return 1;
}

public JetPackCheck()
{
	for(new i = 0; i <MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
	        {
	            new string[128];
	            new name[24];
	            GetPlayerName(i, name, sizeof(name));
	            format(string, sizeof(string), "[Anti-Hack] %s a fost anat din cauza hack-ului de jetkpack!", name);
	            SendClientMessageToAll(COLOR_RED, string);
	            Ban(i);
	            BanLog(string);
			}
		}
	}
	return 1;
}
//===========================================================================// Cu textul asa
new GunNames()[32] = {
	{"Unarmed (Fist)"},
	{"Brass Knuckles"},
	{"Golf Club"},
	{"Night Stick"},
	{"Knife"},
	{"Baseball Bat"},
	{"Shovel"},
	{"Pool Cue"},
	{"Katana"},
	{"Chainsaw"},
	{"Purple Dildo"},
	{"Big White Vibrator"},
	{"Medium White Vibrator"},
	{"Small White Vibrator"},
	{"Flowers"},
	{"Cane"},
	{"Grenade"},
	{"Teargas"},
	{"Molotov"},
	{" "},
	{" "},
	{" "},
	{"Colt 45"},
	{"Silenced Pistol"},
	{"Desert Eagle"},
	{"Normal Shotgun"},
	{"Sawnoff Shotgun"},
	{"Combat Shotgun"},
	{"Micro Uzi (Mac 10)"},
	{"MP5"},
	{"AK47"},
	{"M4"},
	{"Tec9"},
	{"Country Rifle"},
	{"Sniper Rifle"},
	{"Rocket Launcher"},
	{"Heat-Seeking Rocket Launcher"},
	{"Flamethrower"},
	{"Minigun"},
	{"Satchel Charge"},
	{"Detonator"},
	{"Spray Can"},
	{"Fire Extinguisher"},
	{"Camera"},
	{"Night Vision Goggles"},
	{"Infrared Vision Goggles"},
	{"Parachute"},
	{"Fake Pistol"}
};

public AntiHack()
{
	new name[24];
	new weapon;
	new gunammo;
	new string[256];
	for (new i = 0; i <MAX_PLAYERS; i++)
	{
	    for (new w = 0; w <MAX_PLAYERS; w++)
	    {
	        GetPlayerWeaponData(i, w, weapon, gunammo);
	        if((weapon == 10 || weapon == 11 || weapon == 12 || weapon == 13 || weapon == 35 || weapon == 36 || weapon == 37 || weapon == 38 || weapon == 39) && gunammo > 0)
	        {
		        GetPlayerName(i, name, sizeof(name));
	            format(string, sizeof(string), "[Anti-Hack]: %s a fost banat din cauza hack-ului de arme. (Weapon: %s)", name, GunNames(weapon));
	            SendClientMessageToAll(COLOR_RED, string);
	            Ban(i);
	            BanLog(string);
			}
		}
	}
	return 1;
}
imi da atatea eror
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27563) : error 001: expected token: ";", but found "("
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27612) : error 010: invalid function or declaration
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 012: invalid function call, not a valid address
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : warning 215: expression has no effect
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 001: expected token: ";", but found ")"
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : error 029: invalid expression, assumed zero
D:\SERVER~1\SERVER~1\GAMEMO~1\GF02XE~!.pwn(27628) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

Link to comment
Share on other sites

Eu m-am luat de la erorile error 001: expected token: ";", but found "(" si

error 001: expected token: ";", but found "]" .Acolo zice ca lipseste ; . Daca gaseste linia unde lipste aia celelalte erori dispar. Am patit asta. ;)

logo.png

ATENTIE!!! Nu imi trimiteti mesaje private care au legatura cu scriptingul. NU mai scriptez.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By Tican Daniel Andrei
      Salutare, am venit cu o cerință ceva mai "imposibilă" din punctul ăsta de vedere. Am văzut recent pe o comunitate de SA:MP că aveau un fel de Script care bloca modurile Cleo (.cs) și fișierele .exe selectate de către serverul respectiv și pur și simplu lăsau jucătorii cu modpack descărcat de unde aveau ei pagina lor de moduri, lucrul ăsta s-ar putea face din script sau e ceva mai avansat și mai complicat ? 
      Dacă s-ar putea face astfel de script,mi-ați putea spune personal printr-un mesaj privat cât ar costa complexitatea unui script de genul acesta? Mulțumesc și seară plăcută vă doresc! 
    • By shane
      SA-MP Anticheat Include
      'Anticheatu' actioneaza impotriva urmatoarelor tipuri de cheaturi: Troll-Hack, Fly-Hack, Speed-Hack, Teleport-Hack, Jetpack, Fake-Kill, Invisible-Hack
      A fost conceput acum aproape 2 ani, dar a ramas lafel de eficient si in ziua de azi.
      Pentru a putea fi folosit, gamemode-ul vostru necesita libraria YSI, acesta foloseste y_hooks si y_timers.
      E simplu de implementat, doar introduceti fisieru in folderul in care va sunt situate include-urile (pawn/include de obicei), adaugati in functia 'SetPlayerPosEx', urmatoarea linie "serverTeleported(playerid);", si includeti fisierul in gamemode prin linia "#include <locatia_voastra/anticheat_EX>"
      Desigur, s-ar putea sa fie anumite diferente care sa impiedice integrarea in gamemode, asta in cazuri rare.. depinde de voi sa il folositi.
      Va trebui sa faceti o verificare, in cazul in care jucatorul e admin, sa nu primeasca kick. Nu am adaugat, pentru ca depinde de la gamemode, la gamemode. Aceasta verificare se adauga in functiile 'OnCheatDetect' si 'OnWarningExecute'. E chestie la care aveti nevoie de cunostinte basic..
      Posibil sa mai adaug cate o verificare, sa il mai modific, cand am dispozitia si timpul necesar.
      Download: https://bit.ly/3jG8X0q
      VirusTotal: https://bit.ly/3jEUm5q
    • By Quang Minh
      Is there any way to prevent cleo wallhack and nametag?
      I tried hiding my name but it didn't work
    • By VenoMarius
      ../modules/anti-cheats.pwn(1199) : error 017: undefined symbol "SetPlayerTimerEx_"
      ../modules/anti-cheats.pwn(1913) : error 017: undefined symbol "SetPlayerTimerEx_"
      ../modules/anti-cheats.pwn(3462) : error 017: undefined symbol "SetPlayerTimerEx_"
      ../modules/anticheats.pwn(18) : error 017: undefined symbol "FKicked"
      ../modules/anticheats.pwn(18) : warning 215: expression has no effect
      ../modules/anticheats.pwn(18) : error 001: expected token: ";", but found "]"
      ../modules/anticheats.pwn(18) : error 029: invalid expression, assumed zero
      ../modules/anticheats.pwn(18) : fatal error 107: too many error messages on one line
      Compilation aborted.
      Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase
       
      includes:
      #include "../modules/anti-cheats.pwn"
      #include "../modules/anticheats.pwn"
       
    • By VenoMarius
      Am o problema
      in anti troll .pwn scrie asa:
      /*
      OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype);
      Type 1: Teleporting between vehicles (can give cheaters chance to control other's players) (also lag cheat detected here).
      Type 2: Control other player's cars or spin/rotate (Done by checking the player's actual vehicle).
      Type 3: Fast kick/rotate or teleporting inside drivers. (detectd by position change)
      Type 4: Teleporting inside a vehicle illegally as a driver (without PutPlayerInVehicle or OnPlayerEnterVehicle).
      Type 5: Teleporting inside a vehicle illegally as a passenger (without PutPlayerInVehicle or OnPlayerEnterVehicle).
      Type 6: Remote kick a player by tping a vehicle inside of him. (Too fast the server reads it as an unoccupied vehicle).
      */
      si nu stiu ce sa fac
       eu il am asa :
      public OnPlayerCarTroll(playerid, vehicleid, trolledid, trolltype)
      {
          new KickString[80], cheatername[MAX_PLAYER_NAME]; // Kicking message and cheater's name
          GetPlayerName(playerid, cheatername, sizeof(cheatername));//Saving cheater's name in a string
       
          if(trolledid != INVALID_PLAYER_ID)// If the trolled person is valid
          {
              SendClientMessage(trolledid, -1, "You were trolled but the cheater was taken care of");//Inform him
              format(KickString, sizeof(KickString), "Server has kicked %s , reason: Trolling #%d vehicle %d player %d", cheatername, trolltype, vehicleid, trolledid);//Kick with a reasonable message
          }
       
          else format(KickString, sizeof(KickString), "Server has kicked %s , reason: Trolling #%d vehicle %d", cheatername, trolltype, vehicleid);//If no one was trolled kick the troller normally
       
          SendClientMessageToAll(-1, KickString);//Sending the finalized string
          Kick(playerid);//Kicking the cheater
       
          return 1;
      }
      si imi da error.
      Va rog
      Ma poate ajuta cnv ?
      :((
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.