User
Pass
2FA
 
 

Advanced Protocol Manager

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources
Author Message995
FarulNUMOARE
[Banned user]


Banned


Status: Offline
(since 06-09-2013 11:05)
Joined: 14 Aug 2013
Posts: 264, Topics: 37
Location: Constanta.

Reputation: -100.7
Votes: 10

 
Post Posted: 21-08-2013, 10:02:22 | Translate post to: ... (Click for more languages)

Descriere: Cu acest plugin pe server-ul vostru puteti permite si totodata bloca accesul jucatorilor care folosesc un protocol nedorit de voi.

In ce consta acest protocol ?
Ei bine, acest protocol poate fi de 3 tipuri:

1. Valve (NonSteam).
2. FakeSteam.
3. Steam.

Descarcare:
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>

#pragma semicolon 1


#define PLUGIN "Advanced Protocol Manager"
#define VERSION "2.0c"


enum
{
   TYPE_NONSTEAM,
   TYPE_FAKESTEAM,
   TYPE_STEAM,
   
   g_iMaxTypes
   
}


new const g_szKickReason[ g_iMaxTypes ][  ] =
{
   "Pe acest server, nu se pot conecta jucatorii care folosesc VALVE.",
   "Pe acest server, nu se pot conecta jucatorii care folosesc FAKESTEAM.",
   "Pe acest server, nu se pot conecta jucatorii care folosesc STEAM."
};

new gCvarEnableType[ g_iMaxTypes ];
new gCvarRedirectIps[ g_iMaxTypes ];

public plugin_init( )
{
   
   register_plugin ( PLUGIN, VERSION, "Askhanar" );
   //| 0 = pot intra pe server | 1 = nu pot intra pe server | 2 = redirectioneaza catre ... |
   
   gCvarEnableType[ TYPE_NONSTEAM ] = register_cvar( "apm_nonsteam", "0" );
   gCvarEnableType[ TYPE_FAKESTEAM ] = register_cvar( "apm_fakesteam", "0" );
   gCvarEnableType[ TYPE_STEAM ] = register_cvar( "apm_steam", "0" );
   
   
   gCvarRedirectIps[ TYPE_NONSTEAM ] = register_cvar( "apm_nonsteam_ip", "nume.server.ro" );
   gCvarRedirectIps[ TYPE_FAKESTEAM ] = register_cvar( "apm_fakesteam_ip", "nume.server.ro" );
   gCvarRedirectIps[ TYPE_STEAM ] = register_cvar( "apm_steam_ip", "nume.server.ro" );
   
   // Add your code here...
   
}

public client_authorized( id )
{
   
   static iAuthidType;
   iAuthidType = apm_get_user_authid( id );
   
   if( iAuthidType != TYPE_NONSTEAM
      ||  apm_get_cvar_num( TYPE_NONSTEAM ) == 0 )
      goto CheckForFakeSteam;
      
   else if( apm_get_cvar_num( TYPE_NONSTEAM ) == 1 )
   {
      ApmKickUser( id, TYPE_NONSTEAM );
      goto FinishClientAuthorized;
   }
   else if( apm_get_cvar_num( TYPE_NONSTEAM ) == 2 )
   {
      ApmRedirectUser( id, TYPE_NONSTEAM );
      goto FinishClientAuthorized;
   }
   
   CheckForFakeSteam:
   
   if( iAuthidType != TYPE_FAKESTEAM
      ||  apm_get_cvar_num( TYPE_FAKESTEAM ) == 0 )
      goto CheckForSteam;
      
   else if( apm_get_cvar_num( TYPE_FAKESTEAM ) == 1 )
   {
      ApmKickUser( id, TYPE_FAKESTEAM );
      goto FinishClientAuthorized;
   }
   
   else if( apm_get_cvar_num( TYPE_FAKESTEAM ) == 2 )
   {
      ApmRedirectUser( id, TYPE_FAKESTEAM );
      goto FinishClientAuthorized;
   }
   
   CheckForSteam:
   
   if( iAuthidType != TYPE_STEAM
      ||  apm_get_cvar_num( TYPE_STEAM ) == 0 )
      goto FinishClientAuthorized;
   
   else if( apm_get_cvar_num( TYPE_STEAM ) == 1 )
   {
      ApmKickUser( id, TYPE_STEAM );
      goto FinishClientAuthorized;
   }
   
   else if( apm_get_cvar_num( TYPE_STEAM ) == 2 )
      ApmRedirectUser( id, TYPE_STEAM );
   
   FinishClientAuthorized:
   
   return 0;
}

apm_get_cvar_num( const iType )
{
   new iCvarValue;
   iCvarValue = get_pcvar_num( gCvarEnableType[ iType ] );
   
   return iCvarValue;
   
}

apm_get_pcvar_string( const iType )
{
   static szCvarString[ 32 ];
   get_pcvar_string( gCvarRedirectIps[ iType ], szCvarString, sizeof ( szCvarString ) -1 );
   
   return szCvarString;
}
apm_get_user_authid( id )
{
   
   new szAuthId[ 35 ];
   get_user_authid( id, szAuthId, sizeof ( szAuthId ) -1 );
   
   if( szAuthId[ 7 ] == ':' )
      return strlen( szAuthId ) > 18 ? TYPE_FAKESTEAM : TYPE_STEAM;
      
   //else if( szAuthId[ 7 ] == ':' && strlen( szAuthId ) == 18 )
   //   return TYPE_STEAM;
      
   return TYPE_NONSTEAM;
   
}

ApmKickUser( id, const iType )
{
   client_cmd( id, "echo ^"%s^"", g_szKickReason[ iType ] );
   /*
   message_begin( MSG_ONE_UNRELIABLE, SVC_DISCONNECT, _, id );
   write_string( g_szKickReason[ iType ] );
   message_end( );
   */
   server_cmd( "kick #%i ^"%s^"", get_user_userid( id ), g_szKickReason[ iType ] );
}

ApmRedirectUser( id, const iType )
{
   
   client_cmd( id, "echo ^"%s^"", g_szKickReason[ iType ] );
   client_cmd( id, "echo ^"Ai fost redirectionat catre %s^"", apm_get_pcvar_string( iType ) );
   client_cmd( id, "disconnect;Connect %s", apm_get_pcvar_string( iType ) );
}


Nume: Advanced Protocol Manager.
Versiune: 2.0c.
Autor: Askhanar.

Instalare:
1. Fisierul APManager.sma il puneti in addons/amxmodx/scripting.
2. Fisierul APManager.amxx il puneti in addons/amxmodx/plugins.
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Code:
APManager.amxx


Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
Code:
| 0 = pot intra pe server | 1 = nu pot intra pe server (kick + mesaj) | 2 = redirectioneaza catre... (+ mesaj in consola) |


apm_nonsteam <0/1/2>
apm_fakesteam <0/1/2>
apm_steam <0/1/2>


In caz ca unul din cvar-urile de mai sus are valoarea 2 aveti nevoie de adresa/ip-ul unui server catre care va fi redirectionat.

apm_nonsteam_ip "nume.server.ro"
apm_fakesteam_ip "nume.server.ro"
apm_steam_ip "nume.server.ro"


Imagini:





JB.FREAKZ.RO este numarul 1!


Last edited by FarulNUMOARE on 21-08-2013, 11:30:29; edited 1 time in total
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
ion

[prin vacante]



Status: Offline
(since 10-12-2018 10:49)
Joined: 30 Jan 2008
Posts: 7503, Topics: 333
Location: Romania

Reputation: 1770.2
Votes: 191

 
Post Posted: 21-08-2013, 10:48:42 | Translate post to: ... (Click for more languages)

Observ ca le copiezi de-a gata din alte parti. Precizeaza si autorul in cazul asta.


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
FarulNUMOARE
[Banned user]


Banned


Status: Offline
(since 06-09-2013 11:05)
Joined: 14 Aug 2013
Posts: 264, Topics: 37
Location: Constanta.

Reputation: -100.7
Votes: 10

 
Post Posted: 21-08-2013, 11:31:01 | Translate post to: ... (Click for more languages)

ion.mzk wrote:
Observ ca le copiezi de-a gata din alte parti. Precizeaza si autorul in cazul asta.

Doar nu le creez eu, nu am cunostintele necesare. Am editat postul.





JB.FREAKZ.RO este numarul 1!
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Khajiit

[Away]



Status: Offline
(since 01-04-2019 20:33)
Joined: 19 Jun 2013
Posts: 3428, Topics: 110
Location: Away for a long time.

Reputation: 48.4
Votes: 145

          Battletag: postrow.ID_BATTLE_NET}  am-nevoie-de-iconite-la-profil 
Post Posted: 21-08-2013, 11:34:47 | Translate post to: ... (Click for more languages)

Si uite asa lumea intreaga evolueaza prin copy\paste.
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
FarulNUMOARE
[Banned user]


Banned


Status: Offline
(since 06-09-2013 11:05)
Joined: 14 Aug 2013
Posts: 264, Topics: 37
Location: Constanta.

Reputation: -100.7
Votes: 10

 
Post Posted: 21-08-2013, 11:39:40 | Translate post to: ... (Click for more languages)

Khajiit wrote:
Si uite asa lumea intreaga evolueaza prin copy\paste.

Daca nu-ti convine, te poti retrage. Eu incerc sa va ajut, postand diverse plugin-uri. Unii nu stiti sa le cautati sau sa le gasiti, asa ca am zis sa ajut membrii comunitatii Freakz. Daca tu crezi ca faci ceva mai bun pentru comunitate, te rog, fa-o in continuare.





JB.FREAKZ.RO este numarul 1!
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
ion

[prin vacante]



Status: Offline
(since 10-12-2018 10:49)
Joined: 30 Jan 2008
Posts: 7503, Topics: 333
Location: Romania

Reputation: 1770.2
Votes: 191

 
Post Posted: 21-08-2013, 12:27:09 | Translate post to: ... (Click for more languages)

E adevarat ce zici, dar nu m-am referit la plugin in sine, ci la post. Cel care a redactat sau tradus descrierea si instructiunile de folosire a depus un efort, nu mai zic de cel care a scris pluginul. Merita sa fie mentionati. -


0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
FarulNUMOARE
[Banned user]


Banned


Status: Offline
(since 06-09-2013 11:05)
Joined: 14 Aug 2013
Posts: 264, Topics: 37
Location: Constanta.

Reputation: -100.7
Votes: 10

 
Post Posted: 21-08-2013, 12:30:36 | Translate post to: ... (Click for more languages)

ion.mzk wrote:
E adevarat ce zici, dar nu m-am referit la plugin in sine, ci la post. Cel care a redactat sau tradus descrierea si instructiunile de folosire a depus un efort, nu mai zic de cel care a scris pluginul. Merita sa fie mentionati. -

Este clar ca merita, totusi nu mi-am dat seama. Askhanar este unul din cei mai buni scripteri.





JB.FREAKZ.RO este numarul 1!
0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources  


The time now is 16-08-2025, 23:31:05
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password