Anti minugn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti minugn (
/showthread.php?tid=175153)
Anti minugn -
Face9000 - 08.09.2010
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
Re: Anti minugn -
Mauzen - 08.09.2010
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
Re: Anti minugn -
Flabsch - 08.09.2010
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
Re: Anti minugn -
LarzI - 08.09.2010
Not when you lack of 21 cells in your string.
Re: Anti minugn -
jonrb - 08.09.2010
Quote:
Originally Posted by LarzI
Not when you lack of 21 cells in your string.
|
Hahaha +1
Re: Anti minugn -
Stefan_Toretto - 08.09.2010
You can also use JunkBuster Anti-Cheat is a very good one :X
Re: Anti minugn -
F_Lexx - 08.09.2010
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;
}
Re: Anti minugn -
Face9000 - 08.09.2010
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" ?
Re: Anti minugn -
Tommy_Connin - 09.09.2010
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