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

Action after client is authorized


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghostdlr
Senior Member
Join Date: Aug 2010
Old 09-04-2010 , 06:23   Action after client is authorized
Reply With Quote #1

How long does it take for a client to be authorized ?

I want to do some actions exactly after the client was authorized. Is there an event for this ?
ghostdlr is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 09-04-2010 , 06:34   Re: Action after client is authorized
Reply With Quote #2

U can hook "entered the game" message with register_logevent, if thats the moment when u want to do stuff or register_event("InitHUD" , when player just entered and he gets HUD displayed.
__________________

Jack86 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-04-2010 , 06:48   Re: Action after client is authorized
Reply With Quote #3

client_authorized ?
__________________
xPaw is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 09-04-2010 , 07:42   Re: Action after client is authorized
Reply With Quote #4

Can you give me an example with register logevent ?


I already tried with client authorized and it's not working. I have to set a task after 3-4 seconds for a client_cmd to take effect .
ghostdlr is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-04-2010 , 12:00   Re: Action after client is authorized
Reply With Quote #5

What exacly do you want to do ?

client_authorized() is called when a player has succesfully been authorized and has a SteamID... that may happen while player is connecting but also can happen after player connected... or may not happen at all if server has no connection to steam or is cracked or who knows.
__________________

Last edited by Hunter-Digital; 09-04-2010 at 12:02.
Hunter-Digital is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-04-2010 , 13:09   Re: Action after client is authorized
Reply With Quote #6

Maybe the question should be: "What do you mean by authorized?"
__________________
fysiks is offline
ghostdlr
Senior Member
Join Date: Aug 2010
Old 09-05-2010 , 04:40   Re: Action after client is authorized
Reply With Quote #7

I want to execute jointeam 1 or jointeam 2 to the users before they finished loading so they won't see the default chooseteam menu .

For now , I added a task after 3.75-4 seconds in client authorized(my server is steam only) but sometimes users load the game faster and manage to choose a team .
Also, if I lower it below 3.75 the command doesn't have effect sometimes .

Can you suggest a better way ?

Last edited by ghostdlr; 09-05-2010 at 04:43.
ghostdlr is offline
Nyuszy
Senior Member
Join Date: Apr 2009
Old 09-05-2010 , 04:57   Re: Action after client is authorized
Reply With Quote #8

there are some good plugins to force player to a team before he choose...
https://forums.alliedmods.net/showthread.php?t=69819
https://forums.alliedmods.net/showthread.php?t=51098
Nyuszy 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 21:02.


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