Raised This Month: $ Target: $400
 0% 

Prevent map from using say


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cam0
Senior Member
Join Date: Feb 2015
Old 03-18-2015 , 20:28   Prevent map from using say
Reply With Quote #1

Code:
public Action:HookUserChatMessage(Handle:event, const String:chat[], bool:dontBroadcast){
	new client = GetEventInt(event,"userid");
	client = GetClientOfUserId(client);
	if(client == 0)
		return Plugin_Handled;
	
	return Plugin_Continue;
}
So this is what I had, for some reason it's just not working?

And I have this in OnPluginStart
Code:
HookEvent("player_say", 	HookUserChatMessage, 	EventHookMode_Pre);

Last edited by cam0; 03-18-2015 at 20:29.
cam0 is offline
Darkness_
Veteran Member
Join Date: Nov 2014
Old 03-18-2015 , 22:14   Re: Prevent map from using say
Reply With Quote #2

In the root directory of your mod you will find a text file called bspconvar_whitelist.txt. In that, check to see if there is a line that is giving maps access to use 'say'.
Darkness_ is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 03-18-2015 , 22:21   Re: Prevent map from using say
Reply With Quote #3

Quote:
Originally Posted by Darkness_ View Post
In the root directory of your mod you will find a text file called bspconvar_whitelist.txt. In that, check to see if there is a line that is giving maps access to use 'say'.
Or
PHP Code:
public OnPluginStart()
{
    
RegConsoleCmd("say"SayConsole);
}
 
public 
Action:SayConsole(clientargs)
{
    if (
client==0) return Plugin_Handled;
    return 
Plugin_Continue;

__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 03-18-2015 , 22:46   Re: Prevent map from using say
Reply With Quote #4

Protip: Kill the responsible entities upon spawn. Unfortunately some official maps apparently use point_servercommand (so I've been told), but I don't give a fuck (sorry if thats rude but: ). It's just something waiting to be exploited. And BTW, screw most mappers.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

Last edited by Dr. Greg House; 03-18-2015 at 22:46.
Dr. Greg House is offline
_AeonOne_
Member
Join Date: Nov 2012
Location: Berlin, Germany
Old 03-19-2015 , 06:02   Re: Prevent map from using say
Reply With Quote #5

Quote:
Originally Posted by Dr. Greg House View Post
Protip: Kill the responsible entities upon spawn. Unfortunately some official maps apparently use point_servercommand (so I've been told), but I don't give a fuck (sorry if thats rude but: ). It's just something waiting to be exploited. And BTW, screw most mappers.
not cool.
Some maps, (at example many Jailmaps) using point_servercommands also for manipulating physics commands temporary like phys_pushscale to enable some minigames.
And also some maps are using env_hudhint to print keyhinttexts to the clients.
(Source: I was one of the screwed mappers in the past ^^)
And i don't know, exploiting this? I mean, thats nothing which is networked?


EDIT: To give you also a protip:
When you have a FastDL Server or something similar,
(Seperated Download map and server map), you could use a hex editor for the map on the server to replace these commands with whitespaces.
Since the server does not seem to CRC this content it does not lead to errors, your messages are gone and the clients are getting the real map (with the commands). So its a win-win-win situation.
We used this in the past on our servers to get rid of the advertisments in the maps.

Last edited by _AeonOne_; 03-19-2015 at 06:09.
_AeonOne_ is offline
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 03-19-2015 , 06:33   Re: Prevent map from using say
Reply With Quote #6

Quote:
Originally Posted by _AeonOne_ View Post
not cool.
Some maps, (at example many Jailmaps) using point_servercommands also for manipulating physics commands temporary like phys_pushscale to enable some minigames.
And also some maps are using env_hudhint to print keyhinttexts to the clients.
(Source: I was one of the screwed mappers in the past ^^)
And i don't know, exploiting this? I mean, thats nothing which is networked?


EDIT: To give you also a protip:
When you have a FastDL Server or something similar,
(Seperated Download map and server map), you could use a hex editor for the map on the server to replace these commands with whitespaces.
Since the server does not seem to CRC this content it does not lead to errors, your messages are gone and the clients are getting the real map (with the commands). So its a win-win-win situation.
We used this in the past on our servers to get rid of the advertisments in the maps.
point_servercommand should be removed from all maps by default. If map absolutely requires this entity, it is probably sucks anyway since mapmaker failed to do it correctly.
xf117 is offline
Send a message via ICQ to xf117
_AeonOne_
Member
Join Date: Nov 2012
Location: Berlin, Germany
Old 03-19-2015 , 08:32   Re: Prevent map from using say
Reply With Quote #7

Quote:
Originally Posted by xf117 View Post
point_servercommand should be removed from all maps by default. If map absolutely requires this entity, it is probably sucks anyway since mapmaker failed to do it correctly.
Beside the possibility that the mapper can add malicious commands (which i've already seen),
do you have any other constructive argument for it?
The Fact is: their are simply some tasks in making a good minigame-map or jail-map or ...-map where you don't got another way.
At example you cannot do a good soccer-minigame which is suitable for jail-gameplay without altering phys_pushscale. You must use this! There is just no other way around it for the mapmaker. So they don't suck, their just lacking of alternative possibilities.
_AeonOne_ is offline
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 03-19-2015 , 08:43   Re: Prevent map from using say
Reply With Quote #8

Quote:
Originally Posted by _AeonOne_ View Post
Beside the possibility that the mapper can add malicious commands (which i've already seen),
do you have any other constructive argument for it?
The Fact is: their are simply some tasks in making a good minigame-map or jail-map or ...-map where you don't got another way.
At example you cannot do a good soccer-minigame which is suitable for jail-gameplay without altering phys_pushscale. You must use this! There is just no other way around it for the mapmaker. So they don't suck, their just lacking of alternative possibilities.
I've already stated the constructive argument. If you can't figure out the proper way to do it by combining several entities in Source way (triggers, events and filters), you can't produce a good map.
You should not base your actions on something you can't use rather than finding a creative way to combine things you can use.
All the point_servercommands i've seen were either destructive for server itself or abusing trying to give certain people advantage. Without proper moderation (sandbox, white filter or etc) this tool should not even exist.
xf117 is offline
Send a message via ICQ to xf117
_AeonOne_
Member
Join Date: Nov 2012
Location: Berlin, Germany
Old 03-19-2015 , 09:10   Re: Prevent map from using say
Reply With Quote #9

Quote:
Originally Posted by xf117 View Post
I've already stated the constructive argument. If you can't figure out the proper way to do it by combining several entities in Source way (triggers, events and filters), you can't produce a good map.
You should not base your actions on something you can't use rather than finding a creative way to combine things you can use.
All the point_servercommands i've seen were either destructive for server itself or abusing trying to give certain people advantage. Without proper moderation (sandbox, white filter or etc) this tool should not even exist.
Okay we are getting a bit offtopic here so here my last one:
You know what you argument is directing to he? Anything which is not possible with Vanilla stuff is bad stuff. ...did you look on which forum you are writing here?
And yearh i've seen that too, but how i mentioned above: use a hex editor to cut it out of the map and leave the ones which are actually usefull.

Last edited by _AeonOne_; 03-19-2015 at 09:11.
_AeonOne_ is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-19-2015 , 10:00   Re: Prevent map from using say
Reply With Quote #10

I was under the impression that Valve started ignoring point_servercommand in CS:GO unless a specific cvar was set. Or am I confusing that with point_clientcommand?
__________________
Not currently working on SourceMod plugin development.
Powerlord 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 03:19.


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