Question about read_argv / read_args
Hi.
Can read_argv or read_args values be changed? I want to replace the value provided by read_argv/read_args with another value (string). Let's have this as an example: PHP Code:
Thank you. |
Re: Question about read_argv / read_args
xy problem
please explain what are you trying to do |
Re: Question about read_argv / read_args
As I said, I only want to replace a string, provided by read_argv or read_args, with another string. So, next time when read_argv or read_args it's called it will provide the new string and not the old one.
Like get_arg and set_arg (Dynamic number of arguments in functions) but for read_argv or read_args. |
Re: Question about read_argv / read_args
Simply edit the code to use your string instead.
If that's not the answer then: Quote:
|
Re: Question about read_argv / read_args
No, I can not modify the string directly because the string I needed is provided by read_argv or read_args and if the string matches with one string pattern I need to replace this string with another.
Another explanation: Do you know get_arg? I think you know. You can set the value from get_arg using set_arg. So, I need a function (like set_arg) that do the same but for read_argv or read_args. I hope it's clearly now. Pay attention to the first code please and you will understant . Thank you. |
Re: Question about read_argv / read_args
Quote:
|
Re: Question about read_argv / read_args
WHAT THE HELL!!!
Let's say we have 2 function that hook client_command. First plugin: PHP Code:
PHP Code:
This is just an example! So don't ask me to use client_cmd instead of patching! I hope this time you will understand what I want! So, there is such method or no? Doens't matter if I need to use orpheu to patch that. I really need a method to do that. |
Re: Question about read_argv / read_args
Nobody?
Ok. Let's take another approach. Do you know a method like "engclient_cmd" for server (which I don't need to use id)? Because engclient_cmd(0, "command") don't work. native engclient_cmd(index, const command[], const arg1[] = "", const arg2[] = ""); -> something like this: native engsrv_cmd(const command[], const arg1[] = "", const arg2[] = ""); ? |
Re: Question about read_argv / read_args
If you want to change the command just edit the plugin. If you do not have the source code, don't use the plugin.
Edit: read_argv uses pfnCmd_Argv, which is an engine exported function. With orpheu you may be able to hook the function and alter it's value when it is called. Look at this example(note that I am not sure what you want to do, so I don't know what snippet to give you, look at the example and try to make what you need to). PHP Code:
Code:
{ |
Re: Question about read_argv / read_args
I said I can't, the command is provided by read_argv / read_args. You can change the client command using engclient_cmd (I forgot to say in #7 I can't use engclient_cmd), but how to change it when there is no id?
|
| All times are GMT -4. The time now is 22:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.