Raised This Month: $ Target: $400
 0% 

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


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

Quote:
Originally Posted by OciXCrom View Post
If you want it in chat, you obviously need "say".
I tried,

PHP Code:
    register_concmd("say /change""CMD_ModeChange"ADMIN_VOTE"<Смена режима Mode 2x2, Открыть/Закрыть карту>"); 
PHP Code:
    }

    
g_pServerVar[m_iBlocked] = blocked_s:block_admin_change;
    
g_pServerVar[m_fNext] = _:(get_gametime() + (VOTE_TIMEWAIT 60.0));
    
g_pServerVar[m_iStatus] ^= map_close;

    if (
get_pcvar_num(pcvar_mode_admin_only) != 0)
    {
        
g_pServerVar[m_iClosedIndex] = (g_pServerVar[m_iStatus] == map_open) ? id 0;
    }

    new 
iPlayers[32], iNump;
    
get_players(iPlayersiNum"ch");

    for (new 
0iNum; ++a)
    {
        
iPlayers[a];

        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;


I used this command from server console, i.e: say /change.

Neither, it sends:
console_print(id, "%s Changed The Mode", szName);

Nor, any function took place, i.e: mode didn't change.

I made these 2 changes, console_print & concmd but it didn't helped, can you please figure out where the problem could be?

Last edited by Alber9091; 07-18-2019 at 14:45.
Alber9091 is offline
 



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 00:49.


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