Staff Commands Pop Up

Results 1 to 10 of 10
  1. #1
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Staff Commands Pop Up

    I'm not a coder, this just shows all Staff Commands on a pop out list, there is one released already but I think its bad and It don't pop out like this.

    Here Is whats better.

    The one in Sahars Source -

    Although that shows the player commands, you get the drift.

    The one in my source -


    I think this is soo much better so i decided to release.

    First of all.

    Open MMatchGlobal.h Line 216
    Replace
    Code:
    #define ANNOUNCE_STRING_LEN                64
    With
    Code:
    #define ANNOUNCE_STRING_LEN                500
    You can do any number, I chose 300 so I got enough room to add more commands.

    Next:

    Search for:
    Code:
    void ChatCmd_AdminAssasin( const char* line, const int argc, char **const argv );
    Add under:
    Code:
    void ChatCmd_Staffcommands(const char* line, const int argc, char **const argv);
    Search for:
    Code:
    _CC_AC("admin_wall",                &ChatCmd_AdminAnnounce,            CCF_ADMIN, ARGVNoMin, 1 , true,"/admin_wall <¸Þ½ÃÁö>", "");
    Add under:
    Code:
    _CC_AC("staff",                &ChatCmd_Staffcommands,            CCF_ADMIN, ARGVNoMin, 1 , true, "/staff", "");
    Search for:
    Code:
    void ChatCmd_AdminPopup(const char* line, const int argc, char **const argv)
    {
         if(ZGetMyInfo()->GetUGradeID() == MMUG_EVENTMASTER)return;
         else if(ZGetMyInfo()->GetUGradeID() == MMUG_DEVELOPER)return;
    
    
        if (argc < 2) 
        {
            OutputCmdWrongArgument(argv[0]);
            return;
        }
    
    
        char szMsg[256];
        //strcpy(szMsg, argv[1]);
        sprintf(szMsg,"%s : %s",ZGetMyInfo()->GetCharName(), argv[1]);
        ZPostAdminAnnounce(ZGetGameClient()->GetPlayerUID(), szMsg, ZAAT_MSGBOX);
    }
    Add under:
    Code:
    void ChatCmd_Staffcommands(const char* line, const int argc, char **const argv) 
    {
    
    
        char szMsg[256];
        sprintf(szMsg,"Staff Commands:\n\n/staff - Shows this dialog with all staff commands. \n/admin_wall - Shouts a message around the server. \n/admin_popup - Pops Up a message on the screen of every player. \n/admin_teleport - Teleport to a selected player.", ZAAT_MSGBOX);
         ZGetGameInterface()->ShowMessage(szMsg);
    }
    Rebuild GunZ and Matchserver.
    Your good to go.

    I'm not a coder, I just did this because I think it's better, please don't post negative comments on how the code is bad or what I done wrong, it works the way I want so there is no need for anything.

    Like if this helps you at all.

    EDIT: Updated code, credits to a1tl4 & qet123.
    Last edited by Chrisss; 20-10-13 at 01:36 PM.


  2. #2
    Valued Member a1tl4 is offline
    MemberRank
    Sep 2012 Join Date
    BrazilLocation
    112Posts

    Re: Staff Commands Pop Up

    This will send message to all players from gunz via popup.

    Use like:

    PHP Code:
    ZGetGameInterface()->ShowMessage.. 

  3. #3
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Staff Commands Pop Up

    Quote Originally Posted by a1tl4 View Post
    This will send message to all players from gunz via popup.

    Use like:

    PHP Code:
    ZGetGameInterface()->ShowMessage.. 
    Staff commands only needs to show for the player itself, and admin_popup is already released.

  4. #4
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    Re: Staff Commands Pop Up

    Replace:
    Code:
    ZPostAdminAnnounce(ZGetGameClient()->GetPlayerUID(), szMsg, ZAAT_MSGBOX);
    With:
    Code:
    ZGetGameInterface()->ShowMessage(szMsg);

  5. #5
    Fuck Army. sahar042 is offline
    MemberRank
    Jul 2009 Join Date
    833Posts

    Re: Staff Commands Pop Up

    He meant that when you will do the command it will post it to all the players in the game, Like admin popup message...
    ZPostAdminAnnounce(ZGetGameClient()->GetPlayerUID(), szMsg, ZAAT_MSGBOX);

  6. #6
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Staff Commands Pop Up

    Quote Originally Posted by sahar042 View Post
    He meant that when you will do the command it will post it to all the players in the game, Like admin popup message...
    ZPostAdminAnnounce(ZGetGameClient()->GetPlayerUID(), szMsg, ZAAT_MSGBOX);
    Yeah I found it out aha, just added now I can see the box ingame. Thanks for saying it though, others will now know.

  7. #7
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: Staff Commands Pop Up

    Funny you are back in guns dev.

    You should put a popup with a push button, Pressing it would get everything ready. such as "hotkeys" or most of them can be used as macros I guess.

  8. #8
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Staff Commands Pop Up

    Watcha mean by pressing it would get everything ready? Such as what?

  9. #9
    人◕ ‿‿ ◕人 Forean is offline
    MemberRank
    Jul 2008 Join Date
    1,183Posts

    Re: Staff Commands Pop Up

    Well, Obviously the macros "/admin_wall sup welcome to" bullshis if anyone even does this anymore. (Counting that 99% of servers die in 2 weeks)

    But

    An ingame admin panel sort of things that has an option menu that allows you to press a few things.



    (I'm high as fuck,)

    Options > Mouse > Aim > Admin Shotbot

    Only grades 255 can see it. Something like that would be crazy. An admin can enable that via options. (Just a cool idea that would probably never be used)

  10. #10
    Praise the Sun! Solaire is offline
    MemberRank
    Dec 2007 Join Date
    Undead BurgLocation
    2,862Posts

    Re: Staff Commands Pop Up

    Quote Originally Posted by Forean View Post
    Only grades 255 can see it. Something like that would be crazy. An admin can enable that via options. (Just a cool idea that would probably never be used)
    You'd be giving everyone a shotbot considering it only takes one instruction to give yourself client-sided admin.



Advertisement