#9459 przez Sru
Cz, 28 sty 2010, 23:30
Plugin automatycznie kickuje osoby ze steam_id_pending przebywające więcej niż 20 sekund. Dzięki temu zmniejsza się pradopodobieństwo timeoutu przy podłączaniu i lagowania serwera/zajmowania slota.
Do kompilatora
Kod: Zaznacz cały/* Anti STEAM_ID_PENDING
About:
This plugin automaticly kicks players that have STEAM_ID_PENDING to long ( default time is 20 sec after their fully connected )

Plugin forum thread: http://www.amxmodx.org/forums/viewtopic.php?p=94121

Credits:
Ops in #AMXmodx @ Quakenet for alot of help ( + AssKicR  & CheesyPeteza )
Gonzo for idea of plugin
*/
#include <amxmodx>
#include <engine>

#define TIME_BEFORE_KICK 20.0
#define MAXPLAYERS 32

#define PLAYER_ATTACK 1         // Player is holding down the attack button
#define PLAYER_ATTACK2 2048      // Player is holdign down the attack2 button

new g_BlockPlayer[MAXPLAYERS+1]

public plugin_init()
{
   register_plugin("Anti STEAM_ID_PENDING", "1.1.0" ,"EKS")
   
   register_clcmd("say","block_gagged")
   register_clcmd("say_team","block_gagged")
}


public client_putinserver(id)
{
   new Authid[35]
   get_user_authid(id,Authid,34)
   if(task_exists(id))
      remove_task(id)

   if(equal(Authid,"STEAM_ID_PENDING"))
   {
      set_task(TIME_BEFORE_KICK,"Task_CheckAuthId",id,_,_,"a",1)
      g_BlockPlayer[id] = 1
      client_print(id,print_chat,"Welcome to our server, for some reason your steamid has not been authenticaded, and you cannot attack/chat untill it is")
      
      new Name[32]
      get_user_name(id,Name,31)
      client_print(0,print_chat,"%s is not allowed to speak or attack untill his steamid is authenticated",Name)
   }
}

public Task_CheckAuthId(id)
{
   new Authid[35]
   get_user_authid(id,Authid,34)   
   if(equal(Authid,"STEAM_ID_PENDING"))
   {
      g_BlockPlayer[id] = 0
      new Name[32],IP[40]
      get_user_name(id,Name,31)
      get_user_ip(id,IP,39)
      
      client_print(0,print_chat,"%s was kicked for having STEAM_ID_PENDING",Name)
      log_amx("%s (IP: %s ) was kicked for having STEAM_ID_PENDING",Name,IP)
      server_cmd("kick #%d because of STEAM_ID_PENDING",get_user_userid(id))
   }
}
new g_Flags // we make it here, as its faster.
public client_PreThink(id)
{
   if(g_BlockPlayer[id] == 0)
      return PLUGIN_CONTINUE
      
   g_Flags = entity_get_int(id,EV_INT_flags)
   if(g_Flags & PLAYER_ATTACK || g_Flags & PLAYER_ATTACK2 )
      entity_set_int(id,EV_INT_flags,0)
   return PLUGIN_CONTINUE
}
public block_gagged(id)
{
   if(g_BlockPlayer[id] == 0)
      return PLUGIN_CONTINUE
   
   client_print(id,print_chat,"You cannot speak or attack untill your Steamid is authenticated")
   return PLUGIN_HANDLED
}

Podobne wątki Statistics Ostatni post
ANTY SS
przez dilemma Śr, 5 gru 2012, 18:39 w Poradniki
11 Odpowiedzi
12164 Wyświetlone

Avatar użytkownika

przez grzywA
So, 29 cze 2013, 11:04
[AMXX] Anty Rash 2.5
przez balu Wt, 15 gru 2009, 02:54 w Kosz
0 Odpowiedzi
4192 Wyświetlone

Avatar użytkownika

przez balu
Wt, 15 gru 2009, 02:54
Anty speedhack- m_sh_guard
przez Sru Śr, 9 cze 2010, 15:24 w Kosz
1 Odpowiedzi
1488 Wyświetlone

Avatar użytkownika

przez balu
Pt, 11 cze 2010, 20:09
Anty dl file(cs 1.5/16)
przez Sru Cz, 7 kwi 2011, 15:34 w Kosz
0 Odpowiedzi
1943 Wyświetlone

Avatar użytkownika

przez Sru
Pt, 20 maja 2011, 16:08
Pakiet Anty-Spam phpBB3/Anti-Spam ACP
przez Sru Śr, 14 lis 2012, 13:52 w Dodatki CS 1.6/Webmastering
0 Odpowiedzi
3928 Wyświetlone

Avatar użytkownika

przez Sru
Śr, 14 lis 2012, 23:00

Kto przegląda forum

Zidentyfikowani użytkownicy: Google[BOT], Tbot