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

CS_InternalCommand not working?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 01-24-2019 , 20:42   CS_InternalCommand not working?
Reply With Quote #1

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;

__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-24-2019 , 22:01   Re: CS_InternalCommand not working?
Reply With Quote #2

According to the documentation of CS_InternalCommand(), it is when the server sends a command to the player.
__________________
fysiks is online now
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 01-24-2019 , 22:09   Re: CS_InternalCommand not working?
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
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?
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-24-2019 , 23:12   Re: CS_InternalCommand not working?
Reply With Quote #4

Why would you want to do that anyways?
__________________

Last edited by fysiks; 01-24-2019 at 23:15.
fysiks is online now
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 01-25-2019 , 06:47   Re: CS_InternalCommand not working?
Reply With Quote #5

Code:
register_clcmd("ping","cmdPing");

public cmdPing()
{
  return PLUGIN_HANDLED;
}

Try normal way
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 01-25-2019 , 07:13   Re: CS_InternalCommand not working?
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
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 View Post
Code:
register_clcmd("ping","cmdPing");

public cmdPing()
{
  return PLUGIN_HANDLED;
}

Try normal way
i'm not that stupid mr smiley
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 01-25-2019 , 07:25   Re: CS_InternalCommand not working?
Reply With Quote #7

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 View Post
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.
__________________

Last edited by klippy; 01-25-2019 at 07:29.
klippy is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 01-25-2019 , 08:38   Re: CS_InternalCommand not working?
Reply With Quote #8

Quote:
Originally Posted by KliPPy View Post
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
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-25-2019 , 23:50   Re: CS_InternalCommand not working?
Reply With Quote #9

IIRC, this community adopted Valve's Policy of Truth which this use case would violate.
__________________
fysiks is online now
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-26-2019 , 06:33   Re: CS_InternalCommand not working?
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
IIRC, this community adopted Valve's Policy of Truth which this use case would violate.
+1
__________________
HamletEagle 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 21:31.


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