Raised This Month: $51 Target: $400
 12% 

Client Connect Public function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Raver
Member
Join Date: May 2009
Location: Germany
Old 03-08-2010 , 12:00   Client Connect Public function
Reply With Quote #1

Hello!
Times I would ask of you, the public have functional, with a message will appear when a player presses the Connect button. The "OnClientPutInServer" is but if he is already really on the server, but I do need a different, faster functional.
Thank you.

Sorry for my Bad english^^
Raver is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 03-08-2010 , 12:02   Re: Client Connect Public function
Reply With Quote #2

Not possible.
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
Raver
Member
Join Date: May 2009
Location: Germany
Old 03-08-2010 , 12:10   Re: Client Connect Public function
Reply With Quote #3

My idea was
Code:
public bool:OnClientConnect(client, String:rejectmsg[], maxlen)
but when i connect i get the message:
Code:
Me :D<2><STEAM_ID_PENDING><>" disconnected (reason "Connection rejected by game
Raver is offline
Cooltad
Veteran Member
Join Date: Apr 2008
Old 03-08-2010 , 12:26   Re: Client Connect Public function
Reply With Quote #4

What you're asking for cannot be achieved I think, unless you're talking about modifying the kick message.
__________________
Please, give me some rep if you found what I posted useful. :]
Cooltad is offline
Raver
Member
Join Date: May 2009
Location: Germany
Old 03-08-2010 , 12:33   Re: Client Connect Public function
Reply With Quote #5

No i dont talking about this kick message.
I want to change the Join MSG.
I can delete this with the player_connect Hooks and
Code:
SetEventBroadcast(event, true);
and then i want to send a custom message. But i need a public function that active on a player press the "connect" button to our server.
Raver is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 03-08-2010 , 12:41   Re: Client Connect Public function
Reply With Quote #6

I don't understand...
You want to make a custom message like "player xxx has joined the game"? If this is it then just use the same player_connect event and print message you want through PrintToChatAll function.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Raver
Member
Join Date: May 2009
Location: Germany
Old 03-08-2010 , 12:43   Re: Client Connect Public function
Reply With Quote #7

yeah but i want to customize the messages with the country etc.
I get it with this:
Code:
	new String:clientname[32];
	GetClientName(client, clientname, sizeof(clientname));
	new String:ip[18];
	GetClientIP(client, ip, sizeof(ip));
	new String:steamid[35];
	GetClientAuthString(client,steamid,sizeof(steamid));
	new String:country[45];
	GeoipCountry(ip, country, sizeof(country));
But for this commands i need the arg "clients" and in the event the arg is not avaible?`
Here:
Code:
public Action:Event_PlayerConnect(Handle:event, const String:name[], bool:dontBroadcast)
Raver is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 03-08-2010 , 12:46   Re: Client Connect Public function
Reply With Quote #8

That is easy
PHP Code:
public Action:Event_PlayerConnect(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    
// other stuff

__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Raver
Member
Join Date: May 2009
Location: Germany
Old 03-08-2010 , 12:48   Re: Client Connect Public function
Reply With Quote #9

It doesnt work with the IP
Raver is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 03-08-2010 , 12:49   Re: Client Connect Public function
Reply With Quote #10

Here you can find all event's variables you can get:
http://wiki.alliedmods.net/Generic_S...player_connect
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
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 02:20.


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