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