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

[ANY] Console Cmd As Host (Listen Server Only) [v1.0.4 | 08-May-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 06-02-2021 , 12:39   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.1 | 31-May-2021]
Reply With Quote #11

Well, I did some research and seems that isn't possible to fire multiple commands like that.
Unfortunately, I won't be able to help you.

Still was an important report to me cause I noticed that in listen servers, the "adminmenu_custom.txt" outputs as chat and not console in the reply source.
__________________

Last edited by Marttt; 06-02-2021 at 22:48.
Marttt is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 07-25-2021 , 18:31   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.1 | 31-May-2021]
Reply With Quote #12

Some commands such as:
sm_who (default plugin of sourcemod)
sm_idle

They have trouble recognizing the person using them the root host has a different index client than number 1.
This occurs when a person creates their Listen Server room and almost instantly another person connects directly to the server using the "connect" command or by connecting from friends list.
For some reason, the person with client index 1, gets root-level permissions, even if are not the host of the room.

In order to trigger this problem, the host must create the Listen Server and the loading screen must be delayed, meanwhile the person connecting must connect almost instantly when the "connect" command can already be used.
Tonblader is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-25-2021 , 22:41   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.2 | 25-July-2021]
Reply With Quote #13

I can't reproduce this issue since I test alone.

I added a new command "sm_whoishost" so you can check which player is set as the "host".

It will output something like this in the console:

Code:
―――――――――――――――――――――――――
|  # | Name     | Host? |
―――――――――――――――――――――――――
|  1 | Mart     |   X   |
|  2 | Ellis    |       |
|  3 | Coach    |       |
|  4 | Rochelle |       |
―――――――――――――――――――――――――
I will ask you to type "!sm_whoishost" in the chat and then check the console and paste the results here in case it happens again.
__________________

Last edited by Marttt; 12-08-2021 at 11:11.
Marttt is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 07-27-2021 , 00:44   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.2 | 25-July-2021]
Reply With Quote #14

Quote:
Originally Posted by Marttt View Post
I added a new command "sm_whoishost" (download again) so you can check which player is set as the "host".
I create the room, but detect someone else.
I even had to execute the command using "say" because I couldn't use it directly in the console.

Spoiler

Last edited by Tonblader; 07-27-2021 at 00:50.
Tonblader is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-27-2021 , 17:42   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.3 | 27-July-2021]
Reply With Quote #15

Thanks for reporting and testing @Tonblader,

I released another version to detect the "host" using another method (IP = 127.0.0.1 / loopback / localhost).

Report again if you find any issues.
__________________

Last edited by Marttt; 07-27-2021 at 19:18.
Marttt is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 10-20-2021 , 00:39   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.3 | 27-July-2021]
Reply With Quote #16

Can you add a cvar where can apply these changes to users with flag z permission?
Sometimes I configure the server together with several people (Listen Server) but they cannot use the sm_* commands through the console.
Tonblader is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 10-20-2021 , 11:00   Re: [L4D1 & L4D2] Console Cmd As Host (Listen Server Only) [v1.0.3 | 27-July-2021]
Reply With Quote #17

Not something I will implement since the host is a single person (and the server won't be online without him).
And checking for the Z flag can lead to multiple users, the plugin won't know who sent the command.

The workaround is using (in bind cases) bind <key> "say /sm_command [args];say /sm_command2;" etc.
__________________

Last edited by Marttt; 12-08-2021 at 11:09.
Marttt is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 05-02-2022 , 03:59   Re: [ANY] Console Cmd As Host (Listen Server Only) [v1.0.3 | 27-July-2021]
Reply With Quote #18

I have a question, could this solve the problem that sometimes I stop being able to use both noclip and sm_noclip, saying in the console that I can't be the target? Or is it a problem that has nothing to do with client index?

Last edited by Toranks; 05-02-2022 at 09:34.
Toranks is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 05-02-2022 , 04:46   Re: [ANY] Console Cmd As Host (Listen Server Only) [v1.0.3 | 27-July-2021]
Reply With Quote #19

Unfortunately not, I still have this issue even using this plugin.

For some reason when I restart the map several times, after a while, some commands stop working.
e.g.: if I use "!noclip" it says that is an invalid target. I never have found the origin of this "bug".
But is kinda random and I'm unable to exactly reproduce.

Even on dedicated servers, I notice this happening sometimes but usually is because the server wasn't able to get the client Auth steamid,
I believe that in local servers this happens more often.
I bet that is because if you connect a lot of times to Steam in a short time, Steam blocks your auth (based on IP maybe) for a while.

If you have more info I can try to find some solution.
__________________
Marttt is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 05-02-2022 , 10:02   Re: [ANY] Console Cmd As Host (Listen Server Only) [v1.0.3 | 27-July-2021]
Reply With Quote #20

LOL this plugin has broken noclip for me even starting the game from a reboot. Unload the plugin solves the problem immediately.

Quote:
] sm_noclip toranks
[SM] Este jugador no puede ser un objetivo tuyo.
Toranks unpaused the game
Toranks unpaused the game
Toranks paused the game
Toranks paused the game
] sm plugins list
[SM] Listing 91 plugins:
[...]
] sm plugins unload 12
[SM] Plugin [ANY] Console Cmd As Host (Listen Server Only) unloaded successfully.
] sm_noclip toranks
L 05/02/2022 - 15:58:09: [funcommands.smx] "Console<0><Console><Console>" toggled noclip on "Toranks<2><STEAM_1:01816717><>"
[SM] toggled noclip on Toranks.
[SM] ADMIN: noclip (des)activado sobre Toranks.
Toranks 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 06:48.


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