AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   get server print (https://forums.alliedmods.net/showthread.php?t=332514)

MacL 05-17-2021 02:58

get server print
 
I need to get the server prints and show the output to the player. Like when a command is for a server console and cannot be used in-game. like:
PHP Code:

register_svcmd("Acc_put""function"); 

output in serverconsole:
PHP Code:

sv_print("Hello World"); 

and showing to player:
PHP Code:

// get sv_print
client_print(idprint_console"%s"sv_print); 

How can i do this?

OrangePeel 05-17-2021 05:07

Re: get server print
 
try this.

PHP Code:

public function() {
    static 
args[194];
    
read_args(argscharsmax(args));

    
client_print(0print_console"%s"args); 



Natsheh 05-17-2021 09:17

Re: get server print
 
What ?

It will be easier to explain what are you trying to achieve rather than code talk.

Napoleon_be 05-17-2021 11:45

Re: get server print
 
Quote:

Originally Posted by Natsheh (Post 2747062)
What ?

It will be easier to explain what are you trying to achieve rather than code talk.

I think he's trying to sort of "activate" commands which are used in the server console, or by using rcon pass, to make them also work as a player command. This is just a simple example of a text message being displayed in the server console, i doubt if this could work for more advanced commands. I'd rather just create a new command in the original plugin that works for players aswell.

MacL 05-18-2021 14:29

Re: get server print
 
Quote:

Originally Posted by OrangePeel (Post 2747035)
try this.

PHP Code:

public function() {
    static 
args[194];
    
read_args(argscharsmax(args));

    
client_print(0print_console"%s"args); 



it cant be like that.

MacL 05-18-2021 14:33

Re: get server print
 
Quote:

Originally Posted by Natsheh (Post 2747062)
What ?

It will be easier to explain what are you trying to achieve rather than code talk.

there is command it can be used only in svConsole. its from a module. it pirnt a text in svConsole. i want to get that text and use it in plugin.


All times are GMT -4. The time now is 19:52.

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