Raised This Month: $ Target: $400
 0% 

[REQ/IDEA] Simple Rank Connect/Disconnect With NAME


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-21-2010 , 12:03   [REQ/IDEA] Simple Rank Connect/Disconnect With NAME
Reply With Quote #1

Connect_Rank[EN].sma


I try to fix this Plugin.


It's correct?


Any Sugestions?

^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-21-2010 , 14:27   Re: [REQ/IDEA] Simple Rank Connect/Disconnect With NAME
Reply With Quote #2

Try this
Code:
#include < amxmodx > #include < geoip > #define SHOW_RANK #if defined SHOW_RANK     #include < csstats > #endif new g_iMsgSayText; public plugin_init( ) { #if defined SHOW_RANK     register_plugin( "Connect Announcer [+Rank]", "1.0", "xPaw" ); #else     register_plugin( "Connect Announcer", "1.0", "xPaw" ); #endif         g_iMsgSayText = get_user_msgid( "SayText" ); } public client_putinserver( id )     ShowClientMessage( id, "connected" ); public client_disconnect( id )     ShowClientMessage( id, "disconnected" ); ShowClientMessage( const id, const szAction[ ] ) {     new szNick[ 32 ], szIP[ 16 ], szCountry[ 46 ];     get_user_name( id, szNick, 31 );     get_user_ip( id, szIP, 15, 1 );         if( szIP[ 0 ] == 'l' && szIP[ 1 ] == 'o' && szIP[ 4 ] == 'b' )         get_user_ip( 0, szIP, 15, 1 );         geoip_country( szIP, szCountry, 45 );         if( szCountry[ 0 ] == 'e' && szCountry[ 1 ] == 'r' && szCountry[ 3 ] == 'o' )         szCountry = "Unknown Country";     #if defined SHOW_RANK     new iTrash[ 8 ], iRank = get_user_stats( id, iTrash, iTrash );         GreenPrint( 0, "^1*^3 %s^1 has^4 %s^1 from^4 %s^1. (Rank:^4 %i^1)", szNick, szAction, szCountry, iRank ); #else     GreenPrint( 0, "^1*^3 %s^1 has^4 %s^1 from^4 %s^1.", szNick, szAction, szCountry ); #endif } GreenPrint( id, const Message[ ], any:... ) {     new szMessage[ 192 ];     vformat( szMessage, 191, Message, 3 );         message_begin( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, g_iMsgSayText, _, id );     write_byte( id ? id : 1 );     write_string( szMessage );     message_end( ); }

Without Country:
Code:
#include < amxmodx > #include < geoip > #define SHOW_RANK #if defined SHOW_RANK     #include < csstats > #endif new g_iMsgSayText; public plugin_init( ) { #if defined SHOW_RANK     register_plugin( "Connect Announcer [+Rank]", "1.0", "xPaw" ); #else     register_plugin( "Connect Announcer", "1.0", "xPaw" ); #endif         g_iMsgSayText = get_user_msgid( "SayText" ); } public client_putinserver( id )     ShowClientMessage( id, "connected" ); public client_disconnect( id )     ShowClientMessage( id, "disconnected" ); ShowClientMessage( const id, const szAction[ ] ) {     new szNick[ 32 ];     get_user_name( id, szNick, 31 );     #if defined SHOW_RANK     new iTrash[ 8 ], iRank = get_user_stats( id, iTrash, iTrash );         GreenPrint( 0, "^1*^3 %s^1 has^4 %s^1. (Rank:^4 %i^1)", szNick, szAction, iRank ); #else     GreenPrint( 0, "^1*^3 %s^1 has^4 %s^1.", szNick, szAction); #endif } GreenPrint( id, const Message[ ], any:... ) {     new szMessage[ 192 ];     vformat( szMessage, 191, Message, 3 );         message_begin( id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, g_iMsgSayText, _, id );     write_byte( id ? id : 1 );     write_string( szMessage );     message_end( ); }
__________________

Last edited by xPaw; 01-21-2010 at 14:32.
xPaw is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-21-2010 , 14:29   Re: [REQ/IDEA] Simple Rank Connect/Disconnect With NAME
Reply With Quote #3

Cvar to remove counrtry?


Thank's anyway
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 01-21-2010 , 14:32   Re: [REQ/IDEA] Simple Rank Connect/Disconnect With NAME
Reply With Quote #4

Posted code without country
__________________
xPaw is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-21-2010 , 14:45   Re: [REQ/IDEA] Simple Rank Connect/Disconnect With NAME
Reply With Quote #5

n1ce.

Ps. I am beginner

^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:08.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode