Monthly Target: $400 Donations: $23
 5% 

GHW Connect Messages


Post New Thread Reply   
 
Thread Tools Display Modes
pankeca
Junior Member
Join Date: Oct 2008
Old 10-12-2010 , 08:48   Re: GHW Connect Messages
Reply With Quote #81

Hello, I am looking for the plugin wich says Welcome to the server, enjoy your stay, hope to see you soon and show player rank.
Sry for bad english
pankeca is offline
koblihakoliba
New Member
Join Date: Dec 2010
Old 12-25-2010 , 09:33   Re: GHW Connect Messages
Reply With Quote #82

I do not want to play sound, what do I write?
koblihakoliba is offline
`666
Veteran Member
Join Date: Jan 2006
Location: UK
Old 12-26-2010 , 16:27   Re: GHW Connect Messages
Reply With Quote #83

Quote:
Originally Posted by koblihakoliba View Post
I do not want to play sound, what do I write?
read 1st post!
`666 is offline
BunnY.
New Member
Join Date: Mar 2011
Old 05-05-2011 , 10:38   Re: GHW Connect Messages
Reply With Quote #84

Thanks, great plugin!
But can you please make only IP shows. Not IP:port.
BunnY. is offline
husam
Member
Join Date: Apr 2011
Old 05-13-2011 , 08:55   Re: GHW Connect Messages
Reply With Quote #85

Hi, I want to disable chat messages like [Amxx] bla bla joined with bla bla steam id from bla bla etc. Instead of this i just want to add some text when players joined and disconnected to server. For Example; When Players and Admins Joined server, there will be a hud Text at the left and like "Blabla Joined, Rank: etc Have Fun" When they disconnected Just "Blabla disconnected server Lets hope he will come back later" With a Yellow Hud text When Server Leaders Joined server, There will be red hud with a sound "Blabla Joined server" I mean can i set the messages and sounds for each flags?
husam is offline
examtot
Senior Member
Join Date: May 2011
Location: Germany
Old 07-29-2011 , 13:20   Re: GHW Connect Messages
Reply With Quote #86

How to to do like The Nick has dissconected
Quote:
/*
* _______ _ _ __ __
* | _____/ | | | | \ \ __ / /
* | | | | | | | | / \ | |
* | | | |____| | | |/ __ \| |
* | | ___ | ______ | | / \ |
* | | |_ | | | | | | / \ |
* | | | | | | | | | | | |
* | |____| | | | | | | | | |
* |_______/ |_| |_| \_/ \_/
*
*
*
* Last Edited: 12-06-09
*
* ============
* Changelog:
* ============
*
* v1.1
* -Bug Fixes
*
* v1.0
* -Initial Release
*
*/

#define VERSION "1.1"

#include <amxmodx>
#include <amxmisc>
#include <geoip>

#define SHOW_COLOR 1
#define SHOW_CONNECT 2
#define SHOW_DISCONNECT 4
#define PLAY_SOUND_CONNECT 8
#define PLAY_SOUND_DISCONNECT 16

new display_type_pcvar

new name[33][32]
new authid[33][32]
new country[33][46]
new ip[33][32]

new connect_soundfile[64]
new disconnect_soundfile[64]

new saytext_msgid

public plugin_init()
{
register_plugin("GHW Connect Messages",VERSION,"GHW_Chronic")
display_type_pcvar = register_cvar("cm_flags","31")
register_cvar("cm_connect_string","%name has connected.")
register_cvar("cm_disconnect_string","%name has disconnected.")

saytext_msgid = get_user_msgid("SayText")
}

public plugin_precache()
{
register_cvar("cm_connect_sound","buttons/bell1.wav")
register_cvar("cm_disconnect_sound","fvox/blip.wav")

get_cvar_string("cm_connect_sound",connect_so undfile,63)
get_cvar_string("cm_disconnect_sound",disconn ect_soundfile,63)

precache_sound(connect_soundfile)
precache_sound(disconnect_soundfile)
}

public client_putinserver(id)
{
if(!is_user_bot(id))
{
get_client_info(id)

new display_type = get_pcvar_num(display_type_pcvar)
if(display_type & SHOW_CONNECT)
{
new string[200]
get_cvar_string("cm_connect_string",string,19 9)
format(string,199,"^x01%s",string)

if(display_type & SHOW_COLOR)
{
new holder[46]

format(holder,45,"^x04%s^x01",name[id])
replace(string,199,"%name",holder)

format(holder,45,"^x04%s^x01",authid[id])
replace(string,199,"%steamid",holder)

format(holder,45,"^x04%s^x01",country[id])
replace(string,199,"%country",holder)

format(holder,45,"^x04%s^x01",ip[id])
replace(string,199,"%ip",holder)
}
else
{
replace(string,199,"%name",name[id])
replace(string,199,"%steamid",authid[id])
replace(string,199,"%country",country[id])
replace(string,199,"%ip",ip[id])
}

new num, players[32], player
get_players(players,num,"ch")
for(new i=0;i<num;i++)
{
player = players[i]

message_begin(MSG_ONE,saytext_msgid,{0,0,0},p layer)
write_byte(player)
write_string(string)
message_end()

if(display_type & PLAY_SOUND_CONNECT)
{
new stringlen = strlen(connect_soundfile)
if(connect_soundfile[stringlen - 1]=='v' && connect_soundfile[stringlen - 2]=='a' && connect_soundfile[stringlen - 3]=='w') //wav
{
client_cmd(player,"spk ^"sound/%s^"",connect_soundfile)
}
if(connect_soundfile[stringlen - 1]=='3' && connect_soundfile[stringlen - 2]=='p' && connect_soundfile[stringlen - 3]=='m') //wav
{
client_cmd(player,"mp3 play ^"sound/%s^"",connect_soundfile)
}
}
}
}
}
}

public get_client_info(id)
{
get_user_name(id,name[id],31)
get_user_authid(id,authid[id],31)

get_user_ip(id,ip[id],31)
geoip_country(ip[id],country[id])
if(equal(country[id],"error"))
{
if(contain(ip[id],"192.168.")==0 || equal(ip[id],"127.0.0.1") || contain(ip[id],"10.")==0 || contain(ip[id],"172.")==0)
{
country[id] = "LAN"
}
if(equal(ip[id],"loopback"))
{
country[id] = "ListenServer User"
}
else
{
country[id] = "Unknown Country"
}
}
}

public client_infochanged(id)
{
if(!is_user_bot(id))
{
get_user_info(id,"name",name[id],31)
}
}

public client_disconnect(id)
{
if(!is_user_bot(id))
{
new display_type = get_pcvar_num(display_type_pcvar)
if(display_type & SHOW_DISCONNECT)
{
new string[200]
get_cvar_string("cm_disconnect_string",string ,199)
format(string,199,"^x01%s",string)

if(display_type & SHOW_COLOR)
{
new holder[46]

format(holder,45,"^x04%s^x01",name[id])
replace(string,199,"%name",holder)

format(holder,45,"^x04%s^x01",authid[id])
replace(string,199,"%steamid",holder)

format(holder,45,"^x04%s^x01",country[id])
replace(string,199,"%country",holder)

format(holder,45,"^x04%s^x01",ip[id])
replace(string,199,"%ip",holder)
}
else
{
replace(string,199,"%name",name[id])
replace(string,199,"%steamid",authid[id])
replace(string,199,"%country",country[id])
replace(string,199,"%ip",ip[id])
}

new num, players[32], player
get_players(players,num,"ch")
for(new i=0;i<num;i++)
{
player = players[i]

message_begin(MSG_ONE,saytext_msgid,{0,0,0},p layer)
write_byte(player)
write_string(string)
message_end()

new stringlen = strlen(disconnect_soundfile)
if(disconnect_soundfile[stringlen - 1]=='v' && disconnect_soundfile[stringlen - 2]=='a' && disconnect_soundfile[stringlen - 3]=='w') //wav
{
client_cmd(player,"spk ^"sound/%s^"",disconnect_soundfile)
}
if(disconnect_soundfile[stringlen - 1]=='3' && disconnect_soundfile[stringlen - 2]=='p' && disconnect_soundfile[stringlen - 3]=='m') //wav
{
client_cmd(player,"mp3 play ^"sound/%s^"",disconnect_soundfile)
}
}
}
}
}

Last edited by examtot; 07-29-2011 at 13:24.
examtot is offline
Send a message via Skype™ to examtot
Old 03-11-2012, 01:58
bazhenov93
This message has been deleted by bazhenov93.
iwillnotchange
Junior Member
Join Date: Apr 2012
Old 04-21-2012 , 16:19   Re: GHW Connect Messages
Reply With Quote #87

I can't figure out what I'm doing wrong, can you please direct me?

Added to my plugins.
Code:
; Custom - Add 3rd party plugins here
GHW_connect.amxx
;automessage.amxx
;nword.amxx
;nirc.amxx
;war3ft.amxx debug
;abd.amxx
;respawn.amxx
;amx_super.amxx
;amx_super_menu.amxx
;amx_super_nospeed.amxx
;xredirect.amxx
;amx_bank.amxx
;amxx_podbotmenu.amxx


Added to my amxx.cfg
Code:
//ghw_connect
cm_connect_string "[AMXX] %name Welcome, please type /respawn to join in, and /changrace to pick a race!"
//- String that is displayed when a player connects
//Default: "[AMXX] %name Welcome, please type /respanw to join in, and /changrace to pick a race!"
cm_disconnect_string "[AMXX] %name (%steamid) has disconnected (%country)."
//- String that is displayed when a player disconnects
//Default: "[AMXX] %name (%steamid) has disconnected (%country)."

cm_flags 7
//Default: 31 (All)

cm_connect_sound "buttons/bell1.wav"
//- Sound file that is played on connect
//Default: "buttons/bell1.wav" (Half-Life Sound)
cm_disconnect_sound "fvox/blip.wav"
//- Sound file that is played on disconnect
//Default: "fvox/blip.wav" (Half-Life Sound)
GHW_connect.amx in my plugins folder, no dice.



modules file.
Code:
\\
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; These modules will be auto-detected and loaded   ;;
;;  as needed.  You do not need to enable them here ;;
;;  unless you have problems.                       ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

fun
engine
fakemeta
geoip
sockets
regex
nvault
cstrike
csx
hamsandwich

IMO: its running, but nothing shows up when people join..
http://www.majhost.com/gallery/twist...er/workign.png
iwillnotchange is offline
luki1412
Senior Member
Join Date: Oct 2008
Location: Seireitei
Old 06-19-2012 , 12:20   Re: GHW Connect Messages
Reply With Quote #88

I fixed the disconnect sound problem.

Plugin attached.
Attached Files
File Type: sma Get Plugin or Get Source (GHW_connect.sma - 326 views - 5.6 KB)
__________________

Last edited by luki1412; 06-29-2013 at 17:31.
luki1412 is offline
talha
Senior Member
Join Date: Jul 2011
Location: On Earth
Old 07-25-2012 , 14:05   Re: GHW Connect Messages
Reply With Quote #89

HI guys i have edited the plugin it compiles without errors and runs but when head admin or vip or admin or users connect message is not displayed
Head admin = ADMIN_IMMUNITY
Admin = ADMIN_LEVEL_A
VIP = ADMIN_KICK
User = ADMIN_USER

PHP Code:
/*
*   _______     _      _  __          __
*  | _____/    | |    | | \ \   __   / /
*  | |         | |    | |  | | /  \ | |
*  | |         | |____| |  | |/ __ \| |
*  | |   ___   | ______ |  |   /  \   |
*  | |  |_  |  | |    | |  |  /    \  |
*  | |    | |  | |    | |  | |      | |
*  | |____| |  | |    | |  | |      | |
*  |_______/   |_|    |_|  \_/      \_/
*
*
*
*  Last Edited: 12-06-09
*
*  ============
*   Changelog:
*  ============
*
*  v1.1
*    -Bug Fixes
*
*  v1.0
*    -Initial Release
*
*/

#define VERSION    "1.1"

#include <amxmodx>
#include <amxmisc>
#include <geoip>

#define SHOW_COLOR        1
#define SHOW_CONNECT        2
#define SHOW_DISCONNECT        4
#define PLAY_SOUND_CONNECT    8
#define PLAY_SOUND_DISCONNECT    16

new display_type_pcvar

new name[33][32]
new 
authid[33][32]
new 
country[33][46]
new 
ip[33][32]

new 
connect_soundfile[64]
new 
disconnect_soundfile[64]

new 
saytext_msgid

public plugin_init()
{
    
register_plugin("GHW Connect Messages",VERSION,"GHW_Chronic")
    
display_type_pcvar register_cvar("cm_flags","31")
    
register_plugin("GHW Connect Messages",VERSION,"GHW_Chronic")
    
display_type_pcvar register_cvar("cm_flags","31")
    
    if(
is_user_admin(ADMIN_IMMUNITY))
    {
    
register_cvar("cm_connect_string","[Head Admin] %name (%steamid) has connected (%country).")
    
register_cvar("cm_disconnect_string","[Head Admin] %name (%steamid) has disconnected (%country).")
         
    return 
0;
    }

    else
    
    if(
is_user_admin(ADMIN_LEVEL_A))
    {
    
register_cvar("cm_connect_string","[Admin] %name (%steamid) has connected (%country).")
    
register_cvar("cm_disconnect_string","[Admin] %name (%steamid) has disconnected (%country).")
    
    return 
0;
         }
    
    else
    if(
is_user_admin(ADMIN_KICK))
    {
    
register_cvar("cm_connect_string","[VIP] %name (%steamid) has connected (%country).")
    
register_cvar("cm_disconnect_string","[VIP] %name (%steamid) has disconnected (%country).")
    
    return 
0;
         }
    
    else
    if(
is_user_admin(ADMIN_USER))
    {
    
register_cvar("cm_connect_string","%name (%steamid) has connected (%country).")
    
register_cvar("cm_disconnect_string","%name (%steamid) has disconnected (%country).")

    return 
0;
         }
    
    
saytext_msgid get_user_msgid("SayText")
    
    return 
0;
}

public 
plugin_precache()
{
    
register_cvar("cm_connect_sound","buttons/bell1.wav")
    
register_cvar("cm_disconnect_sound","fvox/blip.wav")

    
get_cvar_string("cm_connect_sound",connect_soundfile,63)
    
get_cvar_string("cm_disconnect_sound",disconnect_soundfile,63)

    
precache_sound(connect_soundfile)
    
precache_sound(disconnect_soundfile)
}

public 
client_putinserver(id)
{
    if(!
is_user_bot(id))
    {
        
get_client_info(id)

        new 
display_type get_pcvar_num(display_type_pcvar)
        if(
display_type SHOW_CONNECT)
        {
            new 
string[200]
            
get_cvar_string("cm_connect_string",string,199)
            
format(string,199,"^x01%s",string)

            if(
display_type SHOW_COLOR)
            {
                new 
holder[46]

                
format(holder,45,"^x04%s^x01",name[id])
                
replace(string,199,"%name",holder)

                
format(holder,45,"^x04%s^x01",authid[id])
                
replace(string,199,"%steamid",holder)

                
format(holder,45,"^x04%s^x01",country[id])
                
replace(string,199,"%country",holder)

                
format(holder,45,"^x04%s^x01",ip[id])
                
replace(string,199,"%ip",holder)
            }
            else
            {
                
replace(string,199,"%name",name[id])
                
replace(string,199,"%steamid",authid[id])
                
replace(string,199,"%country",country[id])
                
replace(string,199,"%ip",ip[id])
            }

            new 
numplayers[32], player
            get_players
(players,num,"ch")
            for(new 
i=0;i<num;i++)
            {
                
player players[i]

                
message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
                
write_byte(player)
                
write_string(string)
                
message_end()

                if(
display_type PLAY_SOUND_CONNECT)
                {
                    new 
stringlen strlen(connect_soundfile)
                    if(
connect_soundfile[stringlen 1]=='v' && connect_soundfile[stringlen 2]=='a' && connect_soundfile[stringlen 3]=='w'//wav
                    
{
                        
client_cmd(player,"spk ^"sound/%s^"",connect_soundfile)
                    }
                    if(
connect_soundfile[stringlen 1]=='3' && connect_soundfile[stringlen 2]=='p' && connect_soundfile[stringlen 3]=='m'//wav
                    
{
                        
client_cmd(player,"mp3 play ^"sound/%s^"",connect_soundfile)
                    }
                }
            }
        }
    }
}

public 
get_client_info(id)
{
    
get_user_name(id,name[id],31)
    
get_user_authid(id,authid[id],31)

    
get_user_ip(id,ip[id],31)
    
geoip_country(ip[id],country[id])
    if(
equal(country[id],"error"))
    {
        if(
contain(ip[id],"192.168.")==|| equal(ip[id],"127.0.0.1") || contain(ip[id],"10.")==||  contain(ip[id],"172.")==0)
        {
            
country[id] = "LAN"
        
}
        if(
equal(ip[id],"loopback"))
        {
            
country[id] = "ListenServer User"
        
}
        else
        {
            
country[id] = "Unknown Country"
        
}
    }
}

public 
client_infochanged(id)
{
    if(!
is_user_bot(id))
    {
        
get_user_info(id,"name",name[id],31)
    }
}

public 
client_disconnect(id)
{
    if(!
is_user_bot(id))
    {
        new 
display_type get_pcvar_num(display_type_pcvar)
        if(
display_type SHOW_DISCONNECT)
        {
            new 
string[200]
            
get_cvar_string("cm_disconnect_string",string,199)
            
format(string,199,"^x01%s",string)

            if(
display_type SHOW_COLOR)
            {
                new 
holder[46]

                
format(holder,45,"^x04%s^x01",name[id])
                
replace(string,199,"%name",holder)

                
format(holder,45,"^x04%s^x01",authid[id])
                
replace(string,199,"%steamid",holder)

                
format(holder,45,"^x04%s^x01",country[id])
                
replace(string,199,"%country",holder)

                
format(holder,45,"^x04%s^x01",ip[id])
                
replace(string,199,"%ip",holder)
            }
            else
            {
                
replace(string,199,"%name",name[id])
                
replace(string,199,"%steamid",authid[id])
                
replace(string,199,"%country",country[id])
                
replace(string,199,"%ip",ip[id])
            }

            new 
numplayers[32], player
            get_players
(players,num,"ch")
            for(new 
i=0;i<num;i++)
            {
                
player players[i]

                
message_begin(MSG_ONE,saytext_msgid,{0,0,0},player)
                
write_byte(player)
                
write_string(string)
                
message_end()

                new 
stringlen strlen(disconnect_soundfile)
                if(
disconnect_soundfile[stringlen 1]=='v' && disconnect_soundfile[stringlen 2]=='a' && disconnect_soundfile[stringlen 3]=='w'//wav
                
{
                    
client_cmd(player,"spk ^"sound/%s^"",disconnect_soundfile)
                }
                if(
disconnect_soundfile[stringlen 1]=='3' && disconnect_soundfile[stringlen 2]=='p' && disconnect_soundfile[stringlen 3]=='m'//wav
                
{
                    
client_cmd(player,"mp3 play ^"sound/%s^"",disconnect_soundfile)
                }
            }
        }
    }

__________________
PLz do visit my sites
www.igcse.tk
www.alevel.tk
mY Steam
talha is offline
Send a message via Yahoo to talha
DIS
Senior Member
Join Date: Jul 2013
Location: Somewhere Here xD
Old 07-11-2013 , 13:19   Re: GHW Connect Messages
Reply With Quote #90

Good Job !
Is it possible to show as a HUD Message instead of print in chat?
It will be awesome as well as your other plugins
DIS 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 06:19.


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