Add New Commands?

Results 1 to 7 of 7
  1. #1
    Good Guy George qet123 is offline
    MemberRank
    Apr 2009 Join Date
    DesertLocation
    1,432Posts

    idea Add New Commands?

    Hello Guys i want to make "VIP" Grade and i want to have /admin_wall only...how i can add this ?
    Last edited by qet123; 09-08-11 at 10:44 PM.


  2. #2
    igunz.net Dawson is offline
    LegendRank
    Feb 2010 Join Date
    ::1 (Canada BC)Location
    2,581Posts

    Re: Add New Commands?

    You can't easily make grades with access to commands. You'd need to have a server side interpreter to handle the commands (Or client -> Custom packets IE: MCommand) so look into that before you even try.

  3. #3
    Enthusiast Tishiablo is offline
    MemberRank
    Dec 2009 Join Date
    TexasLocation
    43Posts

    Re: Add New Commands?

    What I would do is make a list on the server wide with all of your VIP users, and hook the admin announce function on the server exe.

    pseudo code:
    Code:
    void OnAdminAnnounceHook(MUID* uid, char* msg, int iType)
    {
       ifstream file("vip.txt");
       string User;
       //read file line by line
       while(!file.eof())
       {
          getLine(file, User);
          if(strstr(User.c_str(), GetPlayerByMUID(uid)))
          {
              OnAdminAnnounce(uid, msg, iType);
              file.close();
          }
       }
       file.close();
    }
    Last edited by Tishiablo; 22-07-11 at 08:02 PM.

  4. #4
    igunz.net Dawson is offline
    LegendRank
    Feb 2010 Join Date
    ::1 (Canada BC)Location
    2,581Posts

    Re: Add New Commands?

    EW D: I'd just make them a grade, it's not hard my DLL even lets me add grades on the fly with colour.

    Add the grade, then do something like.

    Code:
    CDetour detour_MMatchServer__OnChannelChat;
    void __stdcall hook_MMatchServer__OnChannelChat(MUID* A, MUID* B, char* C){
    	char buffer[BUFFER_LEN];
    	MMatchObject* player = MGetMatchServer()->GetObjectA(A);
    }
                if(player->GetUGrade() == 69){
    			if(_stricmp(cmd, "/wall")){
    <Do your announce shit here>
     }
    }
    Of course you need to write up a function to grab the ugrade, but it's way easier that way. That's the method I use. Thanks to fisher for originally showing me it, it's just really nice to use.
    Last edited by Dawson; 22-07-11 at 08:28 PM.

  5. #5
    Account Upgraded | Title Enabled! jewness12 is offline
    MemberRank
    Aug 2009 Join Date
    213Posts

    Re: Add New Commands?

    Quote Originally Posted by Tishiablo View Post
    What I would do is make a list on the server wide with all of your VIP users, and hook the admin announce function on the server exe.

    pseudo code:
    Code:
    void OnAdminAnnounceHook(MUID* uid, char* msg, int iType)
    {
       ifstream file("vip.txt");
       string User;
       //read file line by line
       while(!file.eof())
       {
          getLine(file, User);
          if(strstr(User.c_str(), GetPlayerByMUID(uid)))
          {
              OnAdminAnnounce(uid, msg, iType);
              file.close();
          }
       }
       file.close();
    }
    Quote Originally Posted by DawsonByrd View Post
    EW D: I'd just make them a grade, it's not hard my DLL even lets me add grades on the fly with colour.

    Add the grade, then do something like.

    Code:
    CDetour detour_MMatchServer__OnChannelChat;
    void __stdcall hook_MMatchServer__OnChannelChat(MUID* A, MUID* B, char* C){
    	char buffer[BUFFER_LEN];
    	MMatchObject* player = MGetMatchServer()->GetObjectA(A);
    }
                if(player->GetUGrade() == 69){
    			if(_stricmp(cmd, "/wall")){
    <Do your announce shit here>
     }
    }
    Of course you need to write up a function to grab the ugrade, but it's way easier that way. That's the method I use. Thanks to fisher for originally showing me it, it's just really nice to use.
    You guys don't understand, he wants a ready .dll with custom VIP grades to admin_wall, he can't even code in C.

    Look through his posts, a pure leecher he is.
    http://forum.ragezone.com/search.php...&starteronly=1
    I wont even bother telling him how it works because he can't do anything without a compiled working .dll

    Nuff said.
    Last edited by jewness12; 22-07-11 at 08:52 PM.

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

    Re: Add New Commands?

    Quote Originally Posted by jewness12 View Post
    You guys don't understand, he wants a ready .dll with custom VIP grades to admin_wall, he can't even code in C.

    Look through his posts, a pure leecher he is.
    http://forum.ragezone.com/search.php...&starteronly=1
    I wont even bother telling him how it works because he can't do anything without a compiled working .dll

    Nuff said.
    well thanks for the hope
    and thanks for the others that tryed to help me , my brother know C#,C++/VB so i will ask him

  7. #7
    Member Trishia is offline
    MemberRank
    Jul 2011 Join Date
    84Posts

    Re: Add New Commands?

    Edit your runnable to HEX
    find the admin_wall
    then if you read some commands
    then change it to another commands name
    E.G.
    /admin_ban change to /mdlso_wgi



Advertisement