Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <colorchat>
- #include <geoip>
- new SoundConnect[] = "buttons/bell1.wav"
- new SoundDisconnect[] = "fvox/blip.wav"
- new Prefix[] = "AMXX"
- public plugin_init()
- {
- register_plugin("Connect Server", "2.0", "ISRaiyaN");
- }
- public plugin_precache()
- {
- precache_sound( SoundConnect )
- precache_sound( SoundDisconnect )
- }
- public client_putinserver( client )
- {
- ColorChat(0, RED, "^4[ ^3%s ^4] ^3%s ^1Has Connected ^4[ ^1SteamID: ^3%s ^4| ^1Country: ^3%s ^4]", Prefix, GetUserName(client), GetUserID(client), GetUserCountry(client));
- client_cmd(0, "spk ^"%s^"", SoundConnect )
- }
- public client_disconnect( client )
- {
- ColorChat(0, RED, "^4[ ^3%s ^4] ^3%s ^1Has Disconnected ^4[ ^1SteamID: ^3%s ^4| ^1Country: ^3%s ^4]", Prefix, GetUserName(client), GetUserID(client), GetUserCountry(client));
- client_cmd(0, "spk ^"%s^"", SoundDisconnect )
- }
- stock GetUserName(client)
- {
- new Name[ 32 ];
- get_user_name( client,Name, charsmax( Name ) );
- return Name;
- }
- stock GetUserID(client)
- {
- new szAuthID[ 32 ]
- get_user_authid( client, szAuthID, charsmax( szAuthID ) );
- return szAuthID;
- }
- stock GetUserCountry(client)
- {
- new szCountry[ 35 ]
- new IP[ 35 ]
- get_user_ip( client, IP, charsmax( IP ) )
- geoip_country( IP, szCountry, sizeof( szCountry ) )
- return szCountry;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement