Author Topic: A function that will be executed once a client enters the game  (Read 671 times)

Is there a function that will execute upon a client's entry, like this?

function onClientEntry(%client) {
   [Code goes here]
}

If there is, please post it here.

gameConnection::autoAdminCheck(%client)

Make sure to return the parent.

I prefer using  function secureClientCmd_ClientJoin(%client,%num,%ID).

I prefer using  function secureClientCmd_ClientJoin(%client,%num,%ID).

That is clientside. Amade's command is serverside. Totally different in terms of what you're looking for. Also, as a courtesy, most scripters avoid that command since Badspot decided to mark it with "secure."

most scripters avoid that command since Badspot decided to mark it with "secure."
Why?

It used to be clientCmdClientJoin, but one update it was passively changed to secure. Obviously that means he'd like it to be kept unused.

It used to be clientCmdClientJoin, but one update it was passively changed to secure. Obviously that means he'd like it to be kept unused.
I'm pretty sure it's just so that the server can't make the client call it, potentially messing something up.
If he wanted it unused, he could make it so it can't be packaged, like he has many other functions.

I'm pretty sure it's just so that the server can't make the client call it, potentially messing something up.
If he wanted it unused, he could make it so it can't be packaged, like he has many other functions.

Well, not totally my word. Other prominent scripters told me it was preferred to avoid it.