Thread: Legit ban?
View Single Post
TheGodKing
BANNED
Join Date: Dec 2012
Location: PrintToChatAll("Australia");
Old 04-20-2014 , 06:42   Re: Legit ban?
Reply With Quote #12

SMAC doesn't wait for 20 consecutive perfect jumps, it actually stock piles detections (perfect jumps) that are only ever erased if the client reconnects or if they wait for each detection to slowly be purged by a 4 second recurring timer. It takes 1 minute and 20 seconds for 20 detections against a client to diminish due to the 4 second timer.
The number 25 comes from the fact that due to the 4 second timer, by the time you jump 20 times, 5 detections will have been purged.

I've cut some of the code back to help illustrate what happens.

PHP Code:
#define TRIGGER_DETECTIONS    20 // This is the amount of detections needed before banning a client.

new g_iDetections[METHOD_MAX][MAXPLAYERS+1]; // This variable holds each clients detections.

public OnPluginStart()
{
    
CreateTimer(4.0Timer_DecreaseCount_TIMER_REPEAT); // This timer decrements g_iDetections every 4 seconds. (This is why it takes about 25 jumps despite TRIGGER_DETECTIONS being 20)
}

AutoTrigger_Detected(clientmethod// This runs if a client performs a perfect jump.
{
    if (!
IsFakeClient(client) && IsPlayerAlive(client) && ++g_iDetections[method][client] >= TRIGGER_DETECTIONS// Here we use a pre-increment on g_iDetections and compare our value to TRIGGER_DETECTIONS (Which == 20)
    
{
        
SMAC_Ban(client"AutoTrigger Detection: %s"sMethod); // g_iDetections holds a value worth 20+, ban.
    
}

At this point SMAC might sound stupid and ban crazy, but hold your horses!
There is a fail safe to ensure that players who aren't scripting will not throw a single detection.
This however doesn't work for players who use spacebar to bhop, this is why you were eventually detected. This isn't normally a problem because (as someone who bhops) bhoppers usually use their scroll wheel.

Last edited by TheGodKing; 04-20-2014 at 06:56.
TheGodKing is offline