This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

function called while a player joined


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hyphen
Senior Member
Join Date: Aug 2011
Old 06-02-2012 , 06:02   function called while a player joined
Reply With Quote #1

Which amx function gets called when a player successfully connected to the server.

Or any way to hook that.
hyphen is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-02-2012 , 07:22   Re: function called while a player joined
Reply With Quote #2

PHP Code:
client_putinserver(id
This is called when the player enters the server (when the server MOTD is shown).
__________________
<VeCo> is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-03-2012 , 08:07   Re: function called while a player joined
Reply With Quote #3

You might also have a look on this: http://www.amxmodx.org/funcwiki.php?go=func&id=10
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 06-03-2012 , 11:21   Re: function called while a player joined
Reply With Quote #4

Quote:
client_putinserver - Called when a player is initialized into the game.
Quote:
Quoting am26647, bail said:

"client_putinserver and client_authorized are not guaranteed to happen in any particular order."
Neither of them are called exactly when motd appears but I guess that this or client_connect are as close as you can come.

Note: if you're going to catch their steamid then use client_authorized, not the others.
Erox902 is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 06-03-2012 , 12:29   Re: function called while a player joined
Reply With Quote #5

Quote:
Originally Posted by Erox902 View Post
Neither of them are called exactly when motd appears but I guess that this or client_connect are as close as you can come.

Note: if you're going to catch their steamid then use client_authorized, not the others.
Generally client_authorized is called before client_putinserver. However, client_putinserver will be called just one time instead of client_connect (called at least 2 times if you need to download something) and client_authorized (not sure. probably it will be called more than one time ... sometimes).
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015

Last edited by Leon M.; 06-03-2012 at 12:30.
Leon M. is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 06-03-2012 , 14:40   Re: function called while a player joined
Reply With Quote #6

Quote:
Originally Posted by Leon M. View Post
client_authorized (not sure. probably it will be called more than one time ... sometimes).
I'm not sure about that seems kind of weird that they would be authorized, unauthorized and so on...
Well anyhow I only said if he were going to catch their SteamID, then he should use client_authorized because if they still haven't been authorized their SteamID will be "STEAM_ID_PENDING"

Also were did you here that client_putinserver generally gets called after client_authorized?
Cuz' it doesn't say in any usually order in the funcwiki
Erox902 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-03-2012 , 14:45   Re: function called while a player joined
Reply With Quote #7

Question: is client_authorized triggered before or after client_putinserver()?

i.e. can i trigger get_user_authid for nVault actions within client_putinserver() or will that lead to problems?
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 06-03-2012 at 14:46.
Liverwiz is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-03-2012 , 14:58   Re: function called while a player joined
Reply With Quote #8

Quote:
Originally Posted by Liverwiz View Post
Question: is client_authorized triggered before or after client_putinserver()?

i.e. can i trigger get_user_authid for nVault actions within client_putinserver() or will that lead to problems?
Quote:
Quoting am26647, bail said:

"client_putinserver and client_authorized are not guaranteed to happen in any particular order."
Put everything in putinserver(), you shouldn't have any problems.
__________________

Last edited by Bugsy; 06-03-2012 at 14:58.
Bugsy is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-03-2012 , 15:04   Re: function called while a player joined
Reply With Quote #9

Quote:
Originally Posted by Bugsy View Post
Quote:
Quoting am26647, bail said:

"client_putinserver and client_authorized are not guaranteed to happen in any particular order."
Put everything in putinserver(), you shouldn't have any problems.
lol....right....i forgot. >.<
Thanks!
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 06-03-2012 , 16:54   Re: function called while a player joined
Reply With Quote #10

Quote:
Originally Posted by Liverwiz View Post
Question: is client_authorized triggered before or after client_putinserver()?

i.e. can i trigger get_user_authid for nVault actions within client_putinserver() or will that lead to problems?
It's not guaranteed to cause any problems but I would still use client_authorized since:
Quote:
Quoting am26647, bail said:

"client_putinserver and client_authorized are not guaranteed to happen in any particular order."
And if putinserver gets triggered before then you will have some problems...
Erox902 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 17:51.


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