Anti minugn
#1

Hi all,i need litlle help.

I need a code that ban automatically the user that use minigun.

Exapmle: I use cheats and i get minigun,then i got banned.

Thanks
Reply
#2

You can use OnPlayerUpdate for this, it will ban him instantly and accurate then.
Add this there:

pawn Код:
if(GetPlayerWeapon(playerid) == 38) ban(playerid);
//Will ban the player if he has a minigun as current weapon
Reply
#3

if(GetPlayerWeapon(playerid) == WEAPON_MINIGUN)
{
SendClientMessage(playerid,0xFF5A00FF,"You where kicked by the system.Reason:Minigun");
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s where kicked by the system.Reason: Minigun ", pName);
SendClientMessageToAll(0xFF5A00FF, string);
Kick(playerid);
return 0;
}

I think that looks better in your script
Reply
#4

Not when you lack of 21 cells in your string.
Reply
#5

Quote:
Originally Posted by LarzI
Посмотреть сообщение
Not when you lack of 21 cells in your string.
Hahaha +1
Reply
#6

You can also use JunkBuster Anti-Cheat is a very good one :X
Reply
#7

okey if you write "if(GetPlayerWeapon(playerid) == 38 ) that be founded in case when player hold minigun in hand. Try use this, this script scan all slots:




Код:
public WeaponProtection()
{
	for(new i; i<MAX_PLAYERS; i++)
	{
 		if(IsPlayerConnected(i))
 		{
			new weapon, ammo;
			GetPlayerWeaponData(i, 7, weapon, ammo);//slot 7 - there's saved (RPG, rocket, minigun & flamethrower)
			if(weapon == 38 && ammo >= 1)
			{			    
				Ban(i);
			}
		}
	}
	return true;
}
Reply
#8

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
You can use OnPlayerUpdate for this, it will ban him instantly and accurate then.
Add this there:

pawn Код:
if(GetPlayerWeapon(playerid) == 38) ban(playerid);
//Will ban the player if he has a minigun as current weapon
Thanks.

How to add the message like "PLAYERNAME has been banned for Minigun" ?
Reply
#9

Sorry for posting a non-helpful reply! But also, How do you get it to where it will allow Admins > 1 to not be banned?

Semi on Topic, Here is an example which I do not claim as my own and may need edited and put into pos.

http://pawn.pastebin.com/qqvBR3RC
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)