⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
Sponsor Görsel
Server ip : 95.173.173.2 || Ts3 : LCAPRO www.lcapro.net
Sponsor Görsel 2
SponsorSponsor

Tuş spamlamayı engelleme

Konu

#1
Sanırım makroyla yapılıyor, ardı ardına e veya herhangi bir tuşta spam nasıl önlenebilir?
#2
Kod:
#include <amxmodx>
#include <nvault>
#include <engine>
#include <hamsandwich>

new Dosya;
new harita_ismi[32]
new ButonSecmeIzni[33]
new Tus

#define PLUGIN "Tus Engelleme Eklentisi"
#define VERSION "1.0"
#define AUTHOR "-"


public plugin_init() {
    
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd("say /tusengel","tussec")
    
    get_mapname(harita_ismi,charsmax(harita_ismi))
    
    RegisterHam(Ham_Use, "func_button", "butona_basildi")
    
    
}
public tussec(id){
    if(get_user_flags(id) & ADMIN_RCON ){
    ButonSecmeIzni[id] = 1
    ekran_mesaj_noktasi( 149,68,0, -1.0, -0.70, 2, 4.0, 11.0, 0.01, 1.5 )
    ekran_mesaji(0, "Basilmasini Engellemek Istediginiz Tusa Basiniz.^nEn Fazla 1 Adet Tus Engelleyebilirsiniz.")
    client_cmd(id,"spk sound/turret/tu_spindown.wav")
    }
    else
    {
    ekran_mesaj_noktasi( 255,0,0, -1.0, -0.70, 2, 4.0, 11.0, 0.01, 1.5 )
    ekran_mesaji(0, "Tus Ayarlamasini Yapabilmek Icin RCON Yetkisine Sahip Olmaniz Gerekmektedir.")
    client_cmd(id,"spk sound/buttons/button2.wav")
    }
}
public butona_basildi(buton, id) {
    
    
    if ( ButonSecmeIzni[id] == 1 ){
    ButonSecmeIzni[id] = 0
    
    Tus = buton
    new buton_aparat[7];
    formatex( buton_aparat , charsmax( buton_aparat ) , "%d" , buton );
    nvault_set( Dosya , harita_ismi ,buton_aparat );
    ekran_mesaj_noktasi( 50,255,50, -1.0, -0.30, 2, 4.0, 11.0, 0.01, 1.5 )
    ekran_mesaji(0, "Sectiginiz Dugme Basariyla Ayarlandi.")
    client_cmd(id,"spk sound/turret/tu_spinup.wav")
    }
    else if ( Tus == buton ) {
    return HAM_SUPERCEDE       
    
    }
    return PLUGIN_HANDLED

    
}
public plugin_cfg()
{
    
    Dosya = nvault_open( "EngellenenTuslar" );
    
    if ( Dosya == INVALID_HANDLE )
    set_fail_state( "Vault Dosyasi Acilamadi !" );
    
    Tus = nvault_get( Dosya , harita_ismi );
    
}

public plugin_end()
{
    nvault_close( Dosya );
}
/// HUD MESSAGE ///
#if defined _dhudmessage_included
    #endinput
#endif

#define _dhudmessage_included


stock __dhud_color;
stock __dhud_x;
stock __dhud_y;
stock __dhud_effect;
stock __dhud_fxtime;
stock __dhud_holdtime;
stock __dhud_fadeintime;
stock __dhud_fadeouttime;
stock __dhud_reliable;

stock ekran_mesaj_noktasi( red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 6.0, Float:holdtime = 3.0, Float:fadeintime = 0.1, Float:fadeouttime = 1.5, bool:reliable = false )
{
    #define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
    #define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

    __dhud_color       = pack_color( clamp_byte( red ), clamp_byte( green ), clamp_byte( blue ) );
    __dhud_x           = _:x;
    __dhud_y           = _:y;
    __dhud_effect      = effects;
    __dhud_fxtime      = _:fxtime;
    __dhud_holdtime    = _:holdtime;
    __dhud_fadeintime  = _:fadeintime;
    __dhud_fadeouttime = _:fadeouttime;
    __dhud_reliable    = _:reliable;

    return 1;
}

stock ekran_mesaji( index, const message[], any:... )
{
    new buffer[ 128 ];
    new numArguments = numargs();

    if( numArguments == 2 )
    {
        send_dhudMessage( index, message );
    }
    else if( index || numArguments == 3 )
    {
        vformat( buffer, charsmax( buffer ), message, 3 );
        send_dhudMessage( index, buffer );
    }
    else
    {
        new playersList[ 32 ], numPlayers;
        get_players( playersList, numPlayers, "ch" );

        if( !numPlayers )
        {
            return 0;
        }

        new Array:handleArrayML = ArrayCreate();

        for( new i = 2, j; i < numArguments; i++ )
        {
            if( getarg( i ) == LANG_PLAYER )
            {
                while( ( buffer[ j ] = getarg( i + 1, j++ ) ) ) {}
                j = 0;

                if( GetLangTransKey( buffer ) != TransKey_Bad )
                {
                    ArrayPushCell( handleArrayML, i++ );
                }
            }
        }

        new size = ArraySize( handleArrayML );

        if( !size )
        {
            vformat( buffer, charsmax( buffer ), message, 3 );
            send_dhudMessage( index, buffer );
        }
        else
        {
            for( new i = 0, j; i < numPlayers; i++ )
            {
                index = playersList[ i ];

                for( j = 0; j < size; j++ )
                {
                    setarg( ArrayGetCell( handleArrayML, j ), 0, index );
                }

                vformat( buffer, charsmax( buffer ), message, 3 );
                send_dhudMessage( index, buffer );
            }
        }

        ArrayDestroy( handleArrayML );
    }

    return 1;
}

stock send_dhudMessage( const index, const message[] )
{
    message_begin( __dhud_reliable ? ( index ? MSG_ONE : MSG_ALL ) : ( index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST ), SVC_DIRECTOR, _, index );
    {
        write_byte( strlen( message ) + 31 );
        write_byte( DRC_CMD_MESSAGE );
        write_byte( __dhud_effect );
        write_long( __dhud_color );
        write_long( __dhud_x );
        write_long( __dhud_y );
        write_long( __dhud_fadeintime );
        write_long( __dhud_fadeouttime );
        write_long( __dhud_holdtime );
        write_long( __dhud_fxtime );
        write_string( message );
    }
    message_end();
}
/// INCLUDE HUDMESSAGE BiTTi
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/

CS2 PRO: 185.193.165.15 | CS1.6 JB: 95.173.173.106 | ts3: fastdraw
#3
Basılmasını değil spam yapılmasını engellemek istiyorum üstad
#5
İstek konusu, @"orucoglukayra" adlı kullanıcı tarafından 11 saat içinde çözülmüştür.
İsteği çözdüğü için orucoglukayra Adlı kullanıcıya 1 rep puanı ve 1 yardım etme puanı otomatik olarak verilmiştir.
orucoglukayra Adlı kullanıcı sizin dışınızda toplam 678 kişiye yardım etmiştir.

Herhangi bir konuda hata olduğunu düşünüyorsanız destek sistemi üzerinden iletişim kurabilirsiniz.

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task