Anti Triggerbot -
Kyance - 25.02.2015
Introduction
A include type script which detects
triggerbots with almost no false warnings.
I've "blacklisted" guns which have a big ROF (Rate Of Fire) to avoid the false warns, but lag might cause some false warnings.
* What is triggerbot?
Triggerbot is an aimbot-like cheat, which automatically shoots whenever you aim on a player.
Triggerbot does
NOT follow/"lock on" to the players, it just automatically shoots (triggers) when you place your crosshair ontop of a player.
* How does the script work?
SAMP detects if the player has shot (pressed "KEY_FIRE", or has an aiming animation), and when a bullet is shot.
If the player has pressed KEY_FIRE(Left Mouse Button), we "mark" him as a player who has shot a gun, and later on, at OPWS(OnPlayerWeaponShot), we check if the player has been marked, or not -- if he isn't marked, the code checks if the weapon was valid or not (low to medium ROF (rate of fire) weapons are valid).
If the weapon is valid, we "call" the function "OnPlayerTriggerbot", and desync the bullet.
Callback
The only callback this script has is "OnPlayerTriggerbot".
And you guessed it! It's called when the script detects somebody use triggerbot.
Example of using the function:
pawn Код:
public OnPlayerTriggerbot(playerid)
{
new string[ 47 ];
format(string, sizeof(string), "Oh noes!! PlayerID %d is using triggerbot D':", playerid);
SendClientMessageToAll(-1, string);
return 1;
}
Links
Preview (Do
NOT use for downloads - I won't update this!)
Download
Changelog
Код:
25/02/2015 - Version 1.0
Initial Release
26/02/2015 - Version 1.1
Changed the way the code detects if the weapon is valid or not.
Fixed a bug in the "validweapon" check.
27/02/2015 - Version 1.2
Removed 'foreach'(it wasn't used).
If SAMP hasn't detected the player aim or press KEY_FIRE, the next bullet will be desynced.
Small change in resetting the variable.
04/03/2015 - Version 1.3
Fixed a variable bug, thanks to Gamer_Z!
Re: Anti Triggerbot -
OstGot - 25.02.2015
I think switch/case was always a better solution than the array and loop through it (Unless of course we do not have too many cases).
Just give an example with your code:
pawn Код:
if(PlayerAimed{ playerid } == false)
{
switch(weaponid)
{
case WEAPON_COLT45, WEAPON_SAWEDOFF, WEAPON_UZI, WEAPON_MP5, WEAPON_TEC9,
WEAPON_AK47, WEAPON_M4, WEAPON_MOLTOV, WEAPON_FLAMETHROWER:
{
CallRemoteFunction("OnPlayerTriggerbot", "i", playerid);
return 0;
}
}
}
But the idea is very good, continue in the same spirit
Re: Anti Triggerbot -
Kyance - 25.02.2015
Quote:
Originally Posted by OstGot
I think switch/case was always a better solution than the array and loop through it (Unless of course we do not have too many cases).
Just give an example with your code:
pawn Код:
if(PlayerAimed{ playerid } == false) { switch(weaponid) { case WEAPON_COLT45, WEAPON_SAWEDOFF, WEAPON_UZI, WEAPON_MP5, WEAPON_TEC9, WEAPON_AK47, WEAPON_M4, WEAPON_MOLTOV, WEAPON_FLAMETHROWER: { CallRemoteFunction("OnPlayerTriggerbot", "i", playerid); return 0; } } }
But the idea is very good, continue in the same spirit 
|
Yeah, your way is probably better - Thanks!
(By the way, those guns are actually "blacklisted"/ignored

)
Re : Anti Triggerbot -
streetpeace - 25.02.2015
I was thinking about this question too.
This include ban the cheaters that are using "fugga" cheat too ?
Re: Anti Triggerbot -
Kyance - 26.02.2015
Quote:
Originally Posted by Ralfie
Whats a triggerbot? D:
|
A cheat which automatically fires the gun when you aim at a player.
(It's like aimbot, but it doesn't "lock on" to the players.)
Quote:
Originally Posted by streetpeace
I was thinking about this question too.
This include ban the cheaters that are using "fugga" cheat too ?
|
Uh, I've never tested fugga, so I don't really know
Re: Anti Triggerbot -
Arastair - 26.02.2015
Quote:
Originally Posted by Kyance
A cheat which automatically fires the gun when you aim at a player.
(It's like aimbot, but it doesn't "lock on" to the players.)
Uh, I've never tested fugga, so I don't really know 
|
Something like rappid fire hack?
Re: Anti Triggerbot -
Kyance - 26.02.2015
Quote:
Originally Posted by Arastair
Something like rappid fire hack?
|
It could detect rapid fire & other cheats which make shots super fast.
Re: Anti Triggerbot -
Abagail - 27.02.2015
It'd be better if you edited the first post to explain what a triggerbot is, and how this script prevents it(mechanically-speaking), if you know what I mean.
Re: Anti Triggerbot -
Kyance - 27.02.2015
Quote:
Originally Posted by Abagail
It'd be better if you edited the first post to explain what a triggerbot is, and how this script prevents it(mechanically-speaking), if you know what I mean.
|
Done, thanks!
Re: Anti Triggerbot -
awoo - 27.02.2015
Good job, it'll be very useful for me and many people.