Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------- Includes ----------------------------------------------------
- #include <a_samp>
- //----------- Defines ----------------------------------------------------
- #define COLOR_WHITE 0xFFFFFFA0
- //------------------------------------------------------------------------------
- public OnFilterScriptInit()
- {
- print("\nFilterscript loaded by BoBiTza\n");
- return true;
- }
- public OnFilterScriptExit()
- {
- return true;
- }
- public OnPlayerConnect(playerid)
- {
- new pName[ MAX_PLAYER_NAME ], string[ 128 ];
- new pIP[ 15 ];
- GetPlayerName( playerid, pName, sizeof (pName) );
- GetPlayerIp ( playerid, pIP, sizeof (pIP) );
- for ( new i = 0; i < MAX_PLAYERS; i++ )
- {
- if ( IsPlayerConnected( i ) && playerid != i )
- {
- if ( IsPlayerAdmin( i ) )
- {
- format( string, sizeof (string), "*** %s (%d) joined the server. (%s)", pName, playerid, pIP );
- SendClientMessage(i, COLOR_WHITE, string );
- }
- }
- }
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new pName[MAX_PLAYER_NAME];
- new string[128], szReason[16];
- GetPlayerName(playerid, pName, sizeof(pName));
- switch ( reason )
- {
- case 0:
- {
- szReason = "Timeout";
- }
- case 1:
- {
- szReason = "Leaving";
- }
- case 2:
- {
- szReason = "Kicked";
- }
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && playerid != i )
- {
- if (IsPlayerAdmin(i))
- {
- format(string, sizeof(string), "*** %s left the server. (%s)",pName, szReason );
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement