Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

> Важная информация

Перед тем как создать тему или задать вопрос, ознакомьтесь с данной темой, там собраны наиболее распространенные уязвимости и способы устранения.
Так же не поленитесь воспользоваться поиском, вполне возможно, что ваш вопрос уже поднимался на форуме.
При создании новой темы уделите внимание ее названию, оно должно кратко описывать суть вашего вопроса/проблемы. Все вновь созданные темы с названиями "Помогите", "Объясните", "Подскажите" и т.д. будут удалены, а их авторы наказаны.
2 страниц V   1 2

Anti Fastfire

Статус пользователя STR@TEG
сообщение 26.7.2010, 18:30
Сообщение #21
Стаж: 16 лет

Сообщений: 4186
Благодарностей: 1763
Полезность: 837

Stalcker,
anti_fastfire.sma
Код
/* Plugin generated by AMXX-Studio

Anti FastFire v1.2 by DarkSnow
This plugin will detect and ban cheaters using external application that screw up the tick counter for cs,
thus allowing nearly unlimmited speed in certain aspects. These cheaters may deplete a whole M249(machinegun)
in just a second. You have seen em, i have seen em - everyone have been disturbed by these cheaters.

Id like to point out that this is my second plugin and i would aprishiate any feedback on how you find
it usefull, if it works, how i may improve this plugin etc.

This plugin, just as my previous "Anti SpeedHack" plugin work to 100% with VAC2. It is untested with any
other forms of anti cheat but should run just fine.


Controll
There are 4 cvars
"amx_af_max" | def.val=16 - Defines the maximum Bp/S a player may spray before ban
"amx_af" | def.val=1 - Activates or deactivates Anti FastFire where 1=On; 0=Off
"amx_af_amxban" | def.val=0 - Use amxbans? (requires amxbans plugin) 1=On; 0=Off
"amx_af_bantime" | def.val=30 - Ban users for how long? (requires amxbans plugin)


The Works
Just like my previous plugin, this one is just equaly simple. Basicly, all this plugin does is to cound how
many bullets per second (which we futher will call Bp/S) a player is currently spraying. If a players Bp/S
exeeds a certain value the plugin will administer a ban on that player, save a log entry and publicly announce
that the player have cheated.


Required modules
#include <amxmodx>
#include <amxmisc>


Is the plugin safe to use?
Yes, this script unlike my previous is very secure. You can trust this script to 100%. As refference,
i have also included in the readme file the complete list of all Bp/S values for all buyable weapons in CS.


WARNING! #1
If this program makes your milk in the fridge sour, kidnaps the u.s pressident (mr. george w bush jr aka
"sexual_animal" on various forums) and leaves a random note in your name to the secret service, starts
ww3 or anything unwanted - dont blaim me. In other words, by using this you agree to not sue me or any
similar B.S if anything goes wrong.
Common, im busting my ass doing this crapp and you want to break my legs just for the sake of it not working
propperly? If you dont like it, if it does not work - dont use it.


WARNING! #2
I have not 100% tested it since the program i used to speed up the CS client also speeded up the dedicated
server equaly making it impossible for the server to know any timely difference. Im truly sory about that,
but as of right now i cant setup any other server so im hoping someone with the resources of doing so
will send me feedback about how it went.

You can speed up CS with the following application:
http://www.foredu.com/speed_up/

Sorry about posting a link to a application that may be used as a cheat, but its better to deal with a
problem instead of pretending it does not exists - right?


Credits
XxAvalanchexX - For posting most of what i made my codebase (http://www.amxmodx.org/forums/viewtopic.php?t=17725)
... and your truly, DarkSnow

Please send me any feedback, questions ect either on amxx forums (http://www.amxmodx.org/forums) or;
mathias.frendin@telia.com - msn
-Darkie
*/

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Anti FastFire"
#define VERSION "1.2"
#define AUTHOR "DarkSnow"

#pragma tabsize 0
#define MAX_PLAYERS 32

new countBullets[MAX_PLAYERS+1]
new g_nCurWeapon[MAX_PLAYERS][2]
new g_MaxPlayers

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_event("CurWeapon", "Event_ShotFired", "b")
    register_cvar("amx_af", "1")
    register_cvar("amx_af_max", "16")
    register_cvar("amx_af_amxban", "0")
    register_cvar("amx_af_bantime", "30")
    set_task(1.0, "checkBulletCount", 127, _, _, "b")
}

public Event_ShotFired(id)
{
    new weaponID = read_data(2)
    new wAmmo = read_data(3)
    
    g_MaxPlayers = get_maxplayers()
    
    if(g_nCurWeapon[id-1][0] != weaponID)    // User changed weapons.
    {
        g_nCurWeapon[id-1][0] = weaponID
        g_nCurWeapon[id-1][1] = wAmmo
        return PLUGIN_CONTINUE
    }
    if(g_nCurWeapon[id-1][1] < wAmmo)    // User reloaded.
    {
        g_nCurWeapon[id-1][1] = wAmmo
        return PLUGIN_CONTINUE
    }
    if(g_nCurWeapon[id-1][1] == wAmmo)    // User did something else, but didn't shoot.
        return PLUGIN_CONTINUE
    g_nCurWeapon[id-1][1] = wAmmo
    g_nCurWeapon[id-1][0] = weaponID
    
    countBullets[id]++            // Counting the bullets, one by one, all day long :)
    
    return PLUGIN_CONTINUE
}

public checkBulletCount()
{
    if(get_cvar_num("amx_af") == 1)
    {
        for(new i = 1; i <= g_MaxPlayers; i++)
        {
            if(is_user_alive(i))
            {
                // client_print(i, print_chat, "%i", countBullets[i])
                if(countBullets[i] > get_cvar_num("amx_af_max"))
                {
                    new name[32], authid[32], ip[32], userid, ping, loss, map[32], message[256]
                    // client_print(0, print_chat, "%i", countBullets[i])
                    get_user_name(i, name, 31)
                    get_user_authid(i, authid, 31)
                    get_user_ip(i, ip, 31)
                    userid = get_user_userid(i)
                    get_user_ping(i, ping, loss)
                    get_mapname(map, 31)
                    
                    format(message, 255, "Anti Fast Fire: ^"%s<%d><%s><%s>^" (ping: %d) using Fast Fire on map ^"%s^"", name, userid, authid, ip, ping, map)
                    log_amx(message)
                    
                    client_print(0, print_chat, "%s booted by AF plugin.", name)
                    
                    if(get_cvar_num("amx_af_amxban") == 1)
                    {
                        server_cmd("kick #%d ^"Fast Fire Detected^";wait;addip ^"%s^" ^"%s^";wait;writeip", userid, get_cvar_num("amx_af_bantime"), ip)
                    }
                    else
                    {
                        server_cmd("kick #%d ^"Fast Fire Detected^"", userid)
                    }
                }
            }
            countBullets[i] = 0
        }
    }
}
Если amx_af_amxban "1", то будет производиться бан через консоль сервера командой addip, если же "0", то игрок будет просто кикнут.
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
Поблагодарили 1 раз
   + Цитировать сообщение
Статус пользователя Stalcker
сообщение 28.7.2010, 0:16
Сообщение #22


Стаж: 18 лет

Сообщений: 87
Благодарностей: 10
Полезность: 93

Спасибо, откомпелировался :)
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
2 страниц V   1 2
 
Тема закрытаНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: