AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   CS_InternalCommand not working? (https://forums.alliedmods.net/showthread.php?t=313844)

Dr Zayd 01-24-2019 20:42

CS_InternalCommand not working?
 
Yo, i'm trying to block "ping" command but it doesn't work for me?
i tried everything but idk how ..

PHP Code:

public CS_InternalCommandid, const szCommand[ ] )
{
    new 
cmd[5] = "ping";
    if (
equal(szCommand,cmd,5) )
    {
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;


or this

PHP Code:

public cmd_ShowPlayersPing(id)
{
    return 
PLUGIN_HANDLED_MAIN;



fysiks 01-24-2019 22:01

Re: CS_InternalCommand not working?
 
According to the documentation of CS_InternalCommand(), it is when the server sends a command to the player.

Dr Zayd 01-24-2019 22:09

Re: CS_InternalCommand not working?
 
Quote:

Originally Posted by fysiks (Post 2636490)
According to the documentation of CS_InternalCommand(), it is when the server sends a command to the player.

well do u have any other way to block "ping" command?

fysiks 01-24-2019 23:12

Re: CS_InternalCommand not working?
 
Why would you want to do that anyways?

^SmileY 01-25-2019 06:47

Re: CS_InternalCommand not working?
 
Code:

register_clcmd("ping","cmdPing");

public cmdPing()
{
  return PLUGIN_HANDLED;
}


Try normal way

Dr Zayd 01-25-2019 07:13

Re: CS_InternalCommand not working?
 
Quote:

Originally Posted by fysiks (Post 2636497)
Why would you want to do that anyways?

Well i'm using Ping Faker 1.5 and what the concept of showing players
fakeping on +showscore meanwhile "ping" command showing the real ping
i hope u understand my bad english x]

Quote:

Originally Posted by ^SmileY (Post 2636525)
Code:

register_clcmd("ping","cmdPing");

public cmdPing()
{
  return PLUGIN_HANDLED;
}


Try normal way

i'm not that stupid mr smiley

klippy 01-25-2019 07:25

Re: CS_InternalCommand not working?
 
If I understood ReHLDS code correctly, you can't hook most (I know "fullupdate" is an exception because it purposely notifies the game DLL) of these commands because they are not even forwarded to the mod/game DLL:
Code:

"status", "god", "notarget", "fly", "name", "noclip", "kill", "pause", "spawn", "new", "sendres", "dropclient", "kick", "ping", "dlfile", "nextdl", "setinfo", "showinfo", "sendents", "fullupdate", "setpause", "unpause"
You'll have to hook Host_Ping_f with Orpheu, just like you have to hook Host_Status_f to block "status". Same goes for other commands on the list.

Quote:

Originally Posted by Dr Zayd (Post 2636531)
Well i'm using Ping Faker 1.5 and what the concept of showing players
fakeping on +showscore meanwhile "ping" command showing the real ping
i hope u understand my bad english x]

Players can still see their ping through net_graph. The server is not the only one measuring ping, clients can as well.

Dr Zayd 01-25-2019 08:38

Re: CS_InternalCommand not working?
 
Quote:

Originally Posted by KliPPy (Post 2636536)
If I understood ReHLDS code correctly, you can't hook most (I know "fullupdate" is an exception because it purposely notifies the game DLL) of these commands because they are not even forwarded to the mod/game DLL:
Code:

"status", "god", "notarget", "fly", "name", "noclip", "kill", "pause", "spawn", "new", "sendres", "dropclient", "kick", "ping", "dlfile", "nextdl", "setinfo", "showinfo", "sendents", "fullupdate", "setpause", "unpause"
You'll have to hook Host_Ping_f with Orpheu, just like you have to hook Host_Status_f to block "status". Same goes for other commands on the list.


Players can still see their ping through net_graph. The server is not the only one measuring ping, clients can as well.

Well thanks for the help man

fysiks 01-25-2019 23:50

Re: CS_InternalCommand not working?
 
IIRC, this community adopted Valve's Policy of Truth which this use case would violate.

HamletEagle 01-26-2019 06:33

Re: CS_InternalCommand not working?
 
Quote:

Originally Posted by fysiks (Post 2636654)
IIRC, this community adopted Valve's Policy of Truth which this use case would violate.

+1


All times are GMT -4. The time now is 23:17.

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