Help for Minigun hacking samp - 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)
+--- Thread: Help for Minigun hacking samp (
/showthread.php?tid=512107)
Help for Minigun hacking samp -
jesdynguyen - 09.05.2014
Please help , my server is Roleplay now they have come to make an account use Minigun for DM , please help me , my server have anti but cant stop them , i tried login their account but dont see minigun from it
I hope people help me resolved this
Re: Help for Minigun hacking samp -
Cena44 - 09.05.2014
You can use
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
to detect what weapon the attacker is using and ban him once he shoots someone with the minigun/rpg/flamethrower.
You can also use OnPlayerDeath to ban the attacker AFTER he killed someone using the minigun.
Re : Help for Minigun hacking samp -
Sc0tt - 09.05.2014
You have an other solution.
Like me, you can use the "
OnPlayerKeyStateChange() " and you make this define and this condition :
PHP код:
#define KEY_AIM KEY_HANDBRAKE
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE || newkeys == KEY_AIM) // If the player aims or shoots
{
new weaponid = GetPlayerWeapon(playerid);
if(weaponid == 38) // Minigun is Weapon ID 38
{
ResetPlayerWeapons(playerid);
// Here you ban the player.
return 1;
}
}
return 1;
}