Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Credits: Jeffrey_Hatrix, made for tests, it checks if playerid has typed rcon correct is 'Jeffrey_Hatrix'
- //case not, the player will be kicked.
- #include <a_samp>
- #if !defined INS_MAX_PLAYERS
- #define INS_MAX_PLAYERS (32)
- #endif
- main(){}
- static d_var ;
- public OnPlayerConnect ( playerid )
- {
- new d_nameVar [ MAX_PLAYER_NAME ] ;
- GetPlayerName ( playerid, d_nameVar, MAX_PLAYER_NAME ) ;
- if ( !strcmp ( d_nameVar, "Jeffrey_Hatrix" ) )
- {
- d_var = playerid ;
- }
- return 1 ;
- }
- public OnRconLoginAttempt ( ip[], password [], success )
- {
- new d_playerVar = -1, d_nameVar [ MAX_PLAYER_NAME ] ;
- if ( success )
- {
- while ( d_playerVar < INS_MAX_PLAYERS )
- {
- d_playerVar ++ ;
- if ( d_playerVar == d_var )
- {
- GetPlayerName ( d_playerVar, d_nameVar, sizeof ( d_nameVar ) ) ;
- if ( strcmp ( d_nameVar, "Jeffrey_Hatrix" ) )
- {
- return Kick ( d_playerVar ) ;
- }
- }
- }
- }
- return 1 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment