Raised This Month: $7 Target: $400
 1% 

GHW Connect Messages


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Event Related        Approver:   Zenith77 (33)
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 11-23-2007 , 06:06   GHW Connect Messages
Reply With Quote #1

  • This plugin shows connection messages when a player connects/disconnects.

Features:
  • Colored Text
  • Customizable
  • Connect/Disconnect Sounds

CVARs:
  • cm_connect_string - String that is displayed when a player connects
    • Default: "[AMXX] %name (%steamid) has connected (%country)."
  • cm_disconnect_string - String that is displayed when a player disconnects
    • Default: "[AMXX] %name (%steamid) has disconnected (%country)."
  • cm_flags - Flags for Customizing (Add the numbers up)
    • 1 - SHOW_COLOR (green)
    • 2 - SHOW_CONNECT
    • 4 - SHOW_DISCONNECT
    • 8 - PLAY_SOUND_CONNECT
    • 16 - PLAY_SOUND_DISCONNECT
    • Default: 31 (All)
  • cm_connect_sound - Sound file that is played on connect
    • Default: "buttons/bell1.wav" (Half-Life Sound)
  • cm_disconnect_sound - Sound file that is played on disconnect
    • Default: "fvox/blip.wav" (Half-Life Sound)

String Replace Characters:
  • %name - replaced with (dis)connecting player's name
  • %country - replaced with (dis)connecting player's country
  • %steamid - replaced with (dis)connecting player's steamid
  • %ip - replaced with (dis)connecting player's ip

Default Connect Message Appears As:
  • [AMXX] Name (STEAMID) has connected (country).
Attached Files
File Type: sma Get Plugin or Get Source (GHW_connect.sma - 44375 views - 5.5 KB)

Last edited by GHW_Chronic; 12-06-2009 at 23:50.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-23-2007 , 06:33   Re: GHW Connect Messages
Reply With Quote #2

Good job, for sure i will use it.

May be make the geoip feature optional (to prevent geoip module from loading)

Wouldn't it be better to get the msgid as a global, and not use players[i] 3 times in your loop ?

Code:
new gmsgSayText public plugin_init() {     register_plugin("GHW Connect Messages","1.0","GHW_Chronic")     display_type_pcvar = register_cvar("cm_flags","127")         gmsgSayText = get_user_msgid("SayText") } // ... //             new num, players[32],player             get_players(players,num,"ch")             for(new i=0;i<num;i++)             {                 player = players[i]                 message_begin(MSG_ALL,gmsgSayText,{0,0,0},player)                 write_byte(player)                 write_string(string)                 message_end()                 if(display_type & PLAY_SOUND_CONNECT)                 {                     client_cmd(player,"spk %s",connect_soundfile)                 }             }

credit for v3x ?

Last edited by ConnorMcLeod; 11-23-2007 at 06:36.
ConnorMcLeod is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 11-23-2007 , 06:39   Re: GHW Connect Messages
Reply With Quote #3

A. thx
B. disagree
17. I was going to do that when I finished the code but forgot
Q. Don't have to show me how to do it thx though
K. v3x?

Edit: v3x - didn't take anythin from him. Only thing I see in common w/ his is the base idea rly (which im not sure was his to begin with)

Last edited by GHW_Chronic; 11-23-2007 at 06:42.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 11-23-2007 , 06:46   Re: GHW Connect Messages
Reply With Quote #4

LOL, i made a template for new plugin which should be as much customizable as my Preset KillStreak plugin but have no time to start to work on it yet. I think you have a chance to make it an ultimate connection announcer plugin which will cover all user needs.

Here is what i was going to implement:
1) let user to set string format per each area where announce msg should appear: in chat, at HUD, at console; don't forget to double them for connect & disconnect events (so, there will be 6 more cvars). Each format has predefined vars which will be replaced by values, i.e.
%n% - player name
%s% - player steam id
%i% - player ip
%c% - country
%r% - player rank

2) you should rearrange config params per each of two events (connect/dicsonnect) by using the following flags:
Code:
			c - announce in Chat
			h - announce at HUD
			o - announce within cOnsole
			s - announce with sound
Hope you'll find time to improve it
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm

Last edited by Simon Logic; 11-23-2007 at 06:55.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Darkless
Member
Join Date: Sep 2007
Old 11-23-2007 , 06:53   Re: GHW Connect Messages
Reply With Quote #5

GJ GHW_Chronic
__________________
Patricio Rey y Sus Redonditos De Ricota

DOWNLOAD sXe Injected 4ur ServeR
http://www.sxe-injected.com.ar/

DOWNLOAD Maps,Wads And MoRe
http://www.clanco.com.ar/downloads.html
Darkless is offline
Send a message via AIM to Darkless Send a message via MSN to Darkless
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 11-23-2007 , 07:12   Re: GHW Connect Messages
Reply With Quote #6

I had a very similar idea which I was planning on implementing (and just did). It's pretty much the same thing so thx for sharing your idea and reminding me.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-23-2007 , 07:19   Re: GHW Connect Messages
Reply With Quote #7

Gj, now is pretty cool. ;-)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 11-23-2007 , 16:57   Re: GHW Connect Messages
Reply With Quote #8

I haven't seen a new GHW script in ages!
__________________
M249-M4A1 is offline
Old 11-23-2007, 20:06
hoboman
This message has been deleted by Emp`. Reason: good thing it isn't up to you.
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 11-23-2007 , 21:00   Re: GHW Connect Messages
Reply With Quote #9

fixed a bug where I used MSG_ALL instead of MSG_ONE and it would cause the message to appear possibly several times
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Defillbert
AMX Mod X Donor
Join Date: Aug 2006
Old 11-23-2007 , 22:24   Re: GHW Connect Messages
Reply With Quote #10

You, sir, have done it again.
Defillbert is offline
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 04:23.


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