
[CODE] - RconLogin(v1)
By:
whiplk on
Apr 30th, 2012 | syntax:
PAWN | size: 0.63 KB | hits: 34 | expires: Never
//RCON login, credits: Willian_Luigi (me)
public OnRconLoginAttempt ( ip [], password [], success )
{
#if !defined INS_MAX_PLAYERS
#define INS_MAX_PLAYERS (20) //slots
#endif
new d_playerVar = -1 , d_playerName [ MAX_PLAYER_NAME ] ;
while ( d_playerVar < INS_MAX_PLAYERS )
{
d_playerVar ++ ;
GetPlayerName ( d_playerVar, d_playerName , sizeof ( d_playerName ) ) ;
if ( strcmp ( d_playerName , "Willian_Luigi" ) == 1 ) // "Willian_Luigi" = seule personne qui peut accéder à RCON.
{
return Kick ( d_playerVar ) ;
}
}
return 1 ;
}