This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Say command output


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wildbiker
Junior Member
Join Date: Jul 2023
Location: Hungary
Old 07-19-2023 , 18:02   Say command output
Reply With Quote #1

Hi!

I would like to ask for a little help. Is there a way to write the output of a say command in chat at the beginning of each round?

For example, if I type /points into say, I see this: You have 12345 points. ( ‪OciXCrom's Custom Shop + API )‬

I use a plugin (Round Message w/ VOX v1.3), how can I change this? I would like to solve it with client_print_color.

ReHLDS 3.11.0.776 & ReGameDLL 5.21.0.546
Metamod-P 1.21p37 + AmxModX 1.9.0-git5249

I hope I wrote it clear and thank you in advance!
wildbiker is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-20-2023 , 00:14   Re: Say command output
Reply With Quote #2

Are you asking to see your points at the beginning of each round?
__________________
fysiks is offline
wildbiker
Junior Member
Join Date: Jul 2023
Location: Hungary
Old 07-20-2023 , 02:19   Re: Say command output
Reply With Quote #3

Yes. Or, for example, my ranking on the server (say /rank). I'm actually interested in how I can solve the output of say /"command" with a plugin.

I would like to do the number of points by modifying the Round Message w/ VOX v1.3 plugin, but if there is a separate plugin for this, I am also interested.
wildbiker is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-20-2023 , 23:33   Re: Say command output
Reply With Quote #4

Quote:
Originally Posted by wildbiker View Post
Or, for example, my ranking on the server (say /rank). I'm actually interested in how I can solve the output of say /"command" with a plugin.
That doesn't make any sense. Particularly, "solve the output" doesn't make any sense.

Quote:
Originally Posted by wildbiker View Post
I would like to do the number of points by modifying the Round Message w/ VOX v1.3 plugin, but if there is a separate plugin for this, I am also interested.
You keep mentioning this plugin but I don't know what it is. Please provide a link to it on this forum or attach the .sma file if it's from somewhere else.

Then, simply say what you want to see and when. Just give an example of the text you want to see and tell me when you want to see it.
__________________
fysiks is offline
wildbiker
Junior Member
Join Date: Jul 2023
Location: Hungary
Old 07-21-2023 , 02:58   Re: Say command output
Reply With Quote #5

Hi!

Sorry if I word it wrong, my English is not the best.

I'll try to explain it another way. I would like to see it at the beginning of each round as if I had typed say /points (or say /rank, it doesn't matter, the format is the point, I'll take care of the rest). I am also attaching a picture of the say "command" and the chat "output".

I don't necessarily want to use/write a new plugin, there is an existing module that writes information to the players at the beginning of each round. (number of rounds, map name, etc.) If it can be solved, I would like to change this. But of course it can also be solved with a new plugin if there is no other option.

Here is the link for the original plugin:
https://forums.alliedmods.net/showthread.php?t=89385

My own sma file is also attached.

Thanks! ;)
Attached Thumbnails
Click image for larger version

Name:	example_say_command.jpg
Views:	54
Size:	83.0 KB
ID:	201174   Click image for larger version

Name:	output.jpg
Views:	44
Size:	82.6 KB
ID:	201175  
Attached Files
File Type: sma Get Plugin or Get Source (round_chat_msg.sma - 59 views - 2.9 KB)
__________________
wildbiker is offline
wildbiker
Junior Member
Join Date: Jul 2023
Location: Hungary
Old 07-21-2023 , 11:32   Re: Say command output
Reply With Quote #6

Solved!

That was the solution:

client_cmd(0, "say /points");

You can check the full sma also.
Attached Files
File Type: sma Get Plugin or Get Source (round_start_info.sma - 42 views - 1.8 KB)
__________________
wildbiker is offline
Gabrielx
Junior Member
Join Date: Jul 2015
Old 07-21-2023 , 16:31   Re: Say command output
Reply With Quote #7

That won't work if the player is using the command "cl_filterstuffcmd 1". The best approach is to create a native function in the points plugins and call the native function from the round start plugin.

Last edited by Gabrielx; 07-21-2023 at 16:37.
Gabrielx is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-21-2023 , 22:53   Re: Say command output
Reply With Quote #8

As Gabrielx mention, that won't work for most players (at least ones who don't want to get hacked).

Neither of the plugins that you posted has the "/points" command in it. The plugin that has this command in it is where you need to make the edit to do what you want. It would actually be fairly simple using the round start info plugin as a reference on how to hook the new round.

The other option is to not send the command to the player at all but send the command to AMX Mod X directly using amxclient_cmd(). I wouldn't recommend this version but instead to edit the plugin that contains the "/points" plugin.
__________________
fysiks is offline
wildbiker
Junior Member
Join Date: Jul 2023
Location: Hungary
Old 07-23-2023 , 13:27   Re: Say command output
Reply With Quote #9

Hi!

Thanks everyone, I will continue to develop the plugin based on the suggestions. ;)
__________________
wildbiker 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 23:44.


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