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
WithCode:#define ANNOUNCE_STRING_LEN 64
You can do any number, I chose 300 so I got enough room to add more commands.Code:#define ANNOUNCE_STRING_LEN 500
Next:
Search for:
Add under:Code:void ChatCmd_AdminAssasin( const char* line, const int argc, char **const argv );
Search for:Code:void ChatCmd_Staffcommands(const char* line, const int argc, char **const argv);
Add under:Code:_CC_AC("admin_wall", &ChatCmd_AdminAnnounce, CCF_ADMIN, ARGVNoMin, 1 , true,"/admin_wall <¸Þ½ÃÁö>", "");
Search for:Code:_CC_AC("staff", &ChatCmd_Staffcommands, CCF_ADMIN, ARGVNoMin, 1 , true, "/staff", "");
Add under: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); }
Rebuild GunZ and Matchserver.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); }
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.





Reply With Quote


