Raised This Month: $51 Target: $400
 12% 

Command To Work From Web Console Too, Not Only When You Are In Server.


Post New Thread Reply   
 
Thread Tools Display Modes
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-18-2019 , 14:46   Re: Command To Work From Web Console Too, Not Only When You Are In Server.
Reply With Quote #11

Like this?

From client side > say /change [via conmd/clcmd]
From console > /change [via srvcmd]

PHP Code:
    register_concmd("say /change""CMD_ModeChange"ADMIN_VOTE"<Смена режима Mode 2x2, Открыть/Закрыть карту>"); 
&
PHP Code:
    register_srvcmd("/change""CMD_ModeChange"); 
Alber9091 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-18-2019 , 15:01   Re: Command To Work From Web Console Too, Not Only When You Are In Server.
Reply With Quote #12

Yes. Then you write only /change in server console.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-18-2019 , 17:37   Re: Command To Work From Web Console Too, Not Only When You Are In Server.
Reply With Quote #13

I tried,

PHP Code:
register_concmd "/change"
register_concmd "change"
register_concmd "say /change" 
PHP Code:
register_srvcmd "/change"
register_srvcmd "change"
register_srvcmd "say /change" 
In case of register_concmd, command works from client side but not from console.

In case of srvcmd, command don't work from console.

There is no problem with console, since rest of the commands work very fine from console.


I'm not sure, but I think, here some change would be made? Keeping else condition or whatever possible solution, I have no idea !!

if (get_user_flags(p) & ADMIN_VOTE)

PHP Code:
if (get_user_flags(p) & ADMIN_VOTE)
        {
            
client_print_color(pDontChange id"%L %L"p"MODE_PREFIX"p"MODE_ADMIN_CHANGED_ADMINS"szNamep, (g_pServerVar[m_iStatus] == map_close) ? "MODE_ADMIN_CLOSED" "MODE_ADMIN_OPENED");
            
console_print(id"%s Changed The Mode"szName);
            }
    }

    return 
PLUGIN_HANDLED;


Last edited by Alber9091; 07-18-2019 at 18:06.
Alber9091 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-18-2019 , 18:53   Re: Command To Work From Web Console Too, Not Only When You Are In Server.
Reply With Quote #14

You are just over-complicating. You have been told already what each of x_cmd functions do.
thEsp is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-19-2019 , 02:46   Re: Command To Work From Web Console Too, Not Only When You Are In Server.
Reply With Quote #15

Quote:
Originally Posted by thEsp View Post
You are just over-complicating. You have been told already what each of x_cmd functions do.
Yes, I had told & I want it to work it from client + console.

But with all methods, command is not working from console (concmd, srvcmd), where as working very well from client side (concmd, clcmd).

Brother, why would I complicate things?, if 1 scnerio is not working, I will come back & report & request it.
Alber9091 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 18:12.


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