AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Say command output (https://forums.alliedmods.net/showthread.php?t=343388)

wildbiker 07-19-2023 18:02

Say command output
 
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!

fysiks 07-20-2023 00:14

Re: Say command output
 
Are you asking to see your points at the beginning of each round?

wildbiker 07-20-2023 02:19

Re: Say command output
 
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.

fysiks 07-20-2023 23:33

Re: Say command output
 
Quote:

Originally Posted by wildbiker (Post 2807445)
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 (Post 2807445)
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.

wildbiker 07-21-2023 02:58

Re: Say command output
 
3 Attachment(s)
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! ;)

wildbiker 07-21-2023 11:32

Re: Say command output
 
1 Attachment(s)
Solved!

That was the solution:

client_cmd(0, "say /points");

You can check the full sma also.

Gabrielx 07-21-2023 16:31

Re: Say command output
 
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.

fysiks 07-21-2023 22:53

Re: Say command output
 
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.

wildbiker 07-23-2023 13:27

Re: Say command output
 
Hi!

Thanks everyone, I will continue to develop the plugin based on the suggestions. ;)


All times are GMT -4. The time now is 10:27.

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