25.02.2015, 14:31
(
Последний раз редактировалось Kyance; 04.03.2015 в 17:28.
)
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:
Links
Preview (Do NOT use for downloads - I won't update this!)
Download
Changelog
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;
}
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!