Raised This Month: $ Target: $400
 0% 

connecting private server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
johnz
Junior Member
Join Date: Apr 2009
Old 02-05-2010 , 08:59   connecting private server
Reply With Quote #1

can anyone make a connecting message to a private server like:

when people connect to my private server:

<Killer Private Server: connecting player>
<Killer Private Server: Disconnect player>
johnz is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 02-09-2010 , 07:07   Re: connecting private server
Reply With Quote #2

Here you go, not tested but should work.
Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Connecting Message"
#define VERSION "1.0"
#define AUTHOR "Drekes"


public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
}


public client_connect(id)
{
    if(is_user_bot(id))
    return
        
    new name[32]
    get_user_name(id,name,charsmax(name))

    set_hudmessage(0, 255, 0, -1.0, -1.0)
    show_hudmessage(0, "<Killer Private Server: %s connecting" , name)
}
    
public client_disconnect(id)
{
    new name[32]
    get_user_name(id,name,charsmax(name))
    
    set_hudmessage(0, 255, 0, -1.0, -1.0)
    show_hudmessage(0, "<Killer Private Server:%s disconnected", name)
}
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 02-09-2010 , 09:30   Re: connecting private server
Reply With Quote #3

I dont think it will work since on client_connect player isnt "fully" on server, u can do it maybe on client_putinserver with 1 sec delay, and when client_disconect gets called player is already gone.
__________________

Jack86 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 02-09-2010 , 09:36   Re: connecting private server
Reply With Quote #4

Quote:
Originally Posted by Jack86 View Post
I dont think it will work since on client_connect player isnt "fully" on server, u can do it maybe on client_putinserver with 1 sec delay, and when client_disconect gets called player is already gone.
It will work. On client_connect() player is not authorized yet (that means you can't retrieve his SteamID), but name is OK.
__________________
hleV is offline
Reply



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 07:20.


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