Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Modyfikacja

[ROZWIĄZANE] antiflood + amx_gag

modyfikacja

Najlepsza odpowiedź Andrzejek, 13.04.2014 23:53

Sprawdź

 

/* AMX Mod X
*   Anti Flood Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>

new Float:g_Flooding[33] = {0.0, ...}

new g_Flood[33] = {0, ...}
new amx_flood_time;

public plugin_init() {
    register_plugin("Anti Flood", AMXX_VERSION_STR, "AMXX Dev Team")
    register_dictionary("antiflood.txt")
    register_clcmd("say", "chkFlood")
    register_clcmd("say_team", "chkFlood")
    amx_flood_time=register_cvar("amx_flood_time", "0.75")
}
public chkFlood(id) {
    new Float:maxChat = get_pcvar_float(amx_flood_time)
    
    if(maxChat) {
        new szName[32];    
        new Float:nexTime = get_gametime()
        get_user_name(id, szName, 32)
        
        
        if(g_Flooding[id] > nexTime) {
            if(g_Flood[id] >= 3) {
                client_print(id, print_notify, "** %L **", id, "STOP_FLOOD")
                g_Flooding[id] = nexTime + maxChat + 3.0
                server_cmd("amx_gag ^"%s^" ^"60^" ^"TUTAJ POWOD^"", szName)
                return PLUGIN_HANDLED
            }
            g_Flood[id]++
        }
        else if (g_Flood[id]) {
            g_Flood[id]--
        }
        g_Flooding[id] = nexTime + maxChat
    }
    return PLUGIN_CONTINUE
}
Przejdź do postu


  • Zamknięty Temat jest zamknięty
1 odpowiedź w tym temacie

#1 sq69i

    Zaawansowany

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:87
  • Lokalizacja:Polska
Offline

Napisano 07.04.2014 21:47

Witam, potrafiłby ktoś połączyć pluginy antiflood i amx_gag?

 

/* AMX Mod X
*   Anti Flood Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/


#include <amxmodx>


new Float:g_Flooding[33] = {0.0, ...}
new g_Flood[33] = {0, ...}


new amx_flood_time;


public plugin_init()
{
register_plugin("Anti Flood", AMXX_VERSION_STR, "AMXX Dev Team")
register_dictionary("antiflood.txt")
register_clcmd("say", "chkFlood")
register_clcmd("say_team", "chkFlood")
amx_flood_time=register_cvar("amx_flood_time", "0.75")
}


public chkFlood(id)
{
new Float:maxChat = get_pcvar_float(amx_flood_time)


if (maxChat)
{
new Float:nexTime = get_gametime()


if (g_Flooding[id] > nexTime)
{
if (g_Flood[id] >= 3)
{
client_print(id, print_notify, "** %L **", id, "STOP_FLOOD")
g_Flooding[id] = nexTime + maxChat + 3.0
return PLUGIN_HANDLED
}
g_Flood[id]++
}
else if (g_Flood[id])
{
g_Flood[id]--
}


g_Flooding[id] = nexTime + maxChat
}


return PLUGIN_CONTINUE
}

Aby działało w ten sposób:

ktoś zapycha serwer spamem na czacie, zamiast wpisu w konsoli "przestan zapychac serwer" włączała się funkcja amx_gag "nick_gracza" "czas" "powod"

przykładowo zakaz pisania na 2 minuty


Użytkownik sq69i edytował ten post 07.04.2014 21:48

  • +
  • -
  • 0

#2 Andrzejek

    Ucze się :]

  • Power User

Reputacja: 131
Zaawansowany

  • Postów:1300
  • GG:
  • Steam:steam
  • Imię:Andrzej
  • Lokalizacja:Wadowice
Offline

Napisano 13.04.2014 23:53   Najlepsza odpowiedź

Sprawdź

 

/* AMX Mod X
*   Anti Flood Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>

new Float:g_Flooding[33] = {0.0, ...}

new g_Flood[33] = {0, ...}
new amx_flood_time;

public plugin_init() {
    register_plugin("Anti Flood", AMXX_VERSION_STR, "AMXX Dev Team")
    register_dictionary("antiflood.txt")
    register_clcmd("say", "chkFlood")
    register_clcmd("say_team", "chkFlood")
    amx_flood_time=register_cvar("amx_flood_time", "0.75")
}
public chkFlood(id) {
    new Float:maxChat = get_pcvar_float(amx_flood_time)
    
    if(maxChat) {
        new szName[32];    
        new Float:nexTime = get_gametime()
        get_user_name(id, szName, 32)
        
        
        if(g_Flooding[id] > nexTime) {
            if(g_Flood[id] >= 3) {
                client_print(id, print_notify, "** %L **", id, "STOP_FLOOD")
                g_Flooding[id] = nexTime + maxChat + 3.0
                server_cmd("amx_gag ^"%s^" ^"60^" ^"TUTAJ POWOD^"", szName)
                return PLUGIN_HANDLED
            }
            g_Flood[id]++
        }
        else if (g_Flood[id]) {
            g_Flood[id]--
        }
        g_Flooding[id] = nexTime + maxChat
    }
    return PLUGIN_CONTINUE
}

  • +
  • -
  • 1

Mam do sprzedania pluginy AMXX pod serwery typu, JB, ONLY DD2, ZOMBIE, COD MOD, DR i inne...

 

Jeżeli jesteś zainteresowany(a), napisz na PW lub GG 42384104






Również z jednym lub większą ilością słów kluczowych: modyfikacja

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych