AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Check if user connected (https://forums.alliedmods.net/showthread.php?t=135674)

GXLZPGX 08-18-2010 13:37

Check if user connected
 
Alright, when a client starts connecting, the function is:
public client_connect(id)

But at that point, I'm guessing they aren't truly connected, because I get errors when trying that. I was thinking of setting a task, and then loading the nVault when the task is up, but thats a waste of time.

What is client_putinserver(id)?

t3hNox 08-18-2010 13:47

Re: Check if user connected
 
client_connect includes the loading time, client_putinserver is called when a client "reaches" MOTD window.

ConnorMcLeod 08-18-2010 13:48

Re: Check if user connected
 
For nvault you can use forward client_authorized that is sent when player steamid is known.

GXLZPGX 08-18-2010 14:10

Re: Check if user connected
 
Quote:

Originally Posted by ConnorMcLeod (Post 1274738)
For nvault you can use forward client_authorized that is sent when player steamid is known.

Thanks to the both of you.

Jelle 08-18-2010 23:40

Re: Check if user connected
 
Quote:

Originally Posted by t3hNox (Post 1274736)
client_connect includes the loading time, client_putinserver is called when a client "reaches" MOTD window.

I have always thought that putinserver was the first forward ever called, and connect was when they had loaded. Can anyone clarify this for me?

fysiks 08-18-2010 23:54

Re: Check if user connected
 
Quote:

Originally Posted by Jelle (Post 1275352)
I have always thought that putinserver was the first forward ever called, and connect was when they had loaded. Can anyone clarify this for me?

client_putinserver() is called when the client is put in the server.
client_connect() is when you connect to the server (you haven't loaded anything yet).

OR better yet you can try it out for yourself. Just write a plugin with all the forwards and print stuff to the server console.

Kreation 08-19-2010 00:32

Re: Check if user connected
 
Quote:

Originally Posted by fysiks (Post 1275359)
try it out for yourself.

That sir, is a mighty task that only few have ever accomplished. I do not think he is up for it.

GXLZPGX 08-19-2010 10:57

Re: Check if user connected
 
Quote:

Originally Posted by Kreation (Post 1275378)
That sir, is a mighty task that only few have ever accomplished. I do not think he is up for it.

Do you seriously live off of trolling my threads?

YamiKaitou 08-19-2010 12:22

Re: Check if user connected
 
To clarify, client_putinserver is actually called near the end of the loading screen, not when the MOTD appears.

RedRobster 08-19-2010 12:27

Re: Check if user connected
 
Quote:

Originally Posted by YamiKaitou (Post 1275798)
To clarify, client_putinserver is actually called near the end of the loading screen, not when the MOTD appears.

Mhm, which is why if you are going to do something to someone after they are in the server, you should set a task from client_putinserver().


All times are GMT -4. The time now is 21:53.

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