AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Finding function name from hlds (https://forums.alliedmods.net/showthread.php?t=244258)

Neeeeeeeeeel.- 07-15-2014 22:28

Finding function name from hlds
 
How can I know which function from hlds is called when I execute "+showscores" command?

YamiKaitou 07-15-2014 22:52

Re: Finding function name from hlds
 
The button IN_SCORE is sent when it is held down. I do not believe there is a function called as the scoreboard is rendered by the client.

Neeeeeeeeeel.- 07-16-2014 09:49

Re: Finding function name from hlds
 
Quote:

Originally Posted by YamiKaitou (Post 2168457)
The button IN_SCORE is sent when it is held down. I do not believe there is a function called as the scoreboard is rendered by the client.

Are the names of the scorebar already in the client's memory when you send the command?

meTaLiCroSS 07-16-2014 14:51

Re: Finding function name from hlds
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 2168674)
Are the names of the scorebar already in the client's memory when you send the command?

Everything. Team, scores, all those have a relationship (SVC_CLIENTDATA, TeamInfo msgid, ScoreInfo msgid).

There's no reason to client send a request EVERYTIME when +gamescore button is sent, that would be so overpowered if 32 clients are spamming the command. So, guess by yourself, data is sent to client when it needs to change.

Also, +gamescores is never sent to server.

** When a client uses a command, if is not present on client's game cmd list, it will be sent to the server. (example: "say" and "say_team")

Black Rose 07-16-2014 16:17

Re: Finding function name from hlds
 
Quote:

Originally Posted by meTaLiCroSS (Post 2168840)
Also, +gamescores is never sent to server.

** When a client uses a command, if is not present on client's game cmd list, it will be sent to the server. (example: "say" and "say_team")

Really? So this is the reason I am unable to find any commands using a sniffer? Or are they sent as text if they are on the "client's game cmd list"?
Is there anywhere I can find out more about this?

Nextra 07-16-2014 17:02

Re: Finding function name from hlds
 
Generally everything that has +/- in front of it is client side.

Black Rose 07-16-2014 17:30

Re: Finding function name from hlds
 
I misunderstood. I thought he meant all commands.

meTaLiCroSS 07-16-2014 17:34

Re: Finding function name from hlds
 
Quote:

Originally Posted by Black Rose (Post 2168904)
Really? So this is the reason I am unable to find any commands using a sniffer? Or are they sent as text if they are on the "client's game cmd list"?
Is there anywhere I can find out more about this?

When playing, if you change any cl cvar like "cl_minmodels" to any value, server will never know about it, it will be a waste of bandwidth.

Also, there are some commands from client that when are sent to server (guessing isn't recognized from client) are handled by the "engine". On OSHLDS:

PHP Code:

static const char clcommands[] = { "status""god""notarget""fly""name",
                                     
"noclip""kill""pause""spawn""new",
                                     
"sendres""dropclient""kick""ping",
                                     
"dlfile""nextdl""setinfo""showinfo",
                                     
"sendents""fullupdate""setpause",
                                     
"unpause"NULL }; 

(guess fullupdate is now not handled by the engine) it is handled, but pfnClientCommand called manually for making "mod" handle it.
If isn't a command from these, they are sent by pfnClientCommand to the "mod".

That's handled by SV_ParseStringCommand.

SV_ReadPackets -> SV_ExecuteClientMessage -> SV_ParseStringCommand (game routine)

About your question about finding more about this, i've been just searching long time ago. I've semidecompiled engine and mod and search by myself how some things works, and also I must thank HLSDK and OSHLDS which are really helpful in this case.

Sorry for my english anyway.


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

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