[How To] Disable GM Attack

Results 1 to 6 of 6
  1. #1
    Member omercohen122 is offline
    MemberRank
    Apr 2015 Join Date
    50Posts

    ! [How To] Disable GM Attack

    Hello Beautiful People of RageZone!

    can anyone help me with a source of "Can't attack GM" becuase in my server i can attack GM's and i would like to disable that.
    i use the files of IA Julia 4.6+Source ( http://forum.ragezone.com/f197/relea...4-6-a-1094452/ )


    or a Command like /invincible (on/off) source.

    Anything will help!

    Cheers.
    Last edited by omercohen122; 13-05-20 at 02:27 PM.


  2. #2
    Member omercohen122 is offline
    MemberRank
    Apr 2015 Join Date
    50Posts

    Re: Its a GM Thang

    Up!!!

  3. #3
    Member ispyder is offline
    MemberRank
    Aug 2015 Join Date
    76Posts

    Re: Its a GM Thang

    Edit ObjAttack.cpp


    Edit the following function:
    BOOL CObjAttack::Attack(LPOBJ lpObj, LPOBJ lpTargetObj, CMagicInf* lpMagic, int magicsend, unsigned char MSBFlag, int AttackDamage, BOOL bCombo,BYTE byBarrageCount, BYTE byReflect)
    {
    // at the function beginning add:

    if ( (lpTargetObj->Authority & 32) == 32 )
    {
    MsgOutput(lpObj->m_Index, "Cannot attack GM!");

    MsgOutput(lpTargetObj->m_Index, "%s tried to attack you!", lpObj->Name);

    return false;
    }

    ...
    }
    dont-allow-gm-to-be

    Notes:
    - this is just a quick fix. The side-effects MUST be checked!
    - tested on zTeam ex802

  4. #4
    Member omercohen122 is offline
    MemberRank
    Apr 2015 Join Date
    50Posts

    Re: Its a GM Thang

    Quote Originally Posted by ispyder View Post
    Edit ObjAttack.cpp


    Edit the following function:

    dont-allow-gm-to-be

    Notes:
    - this is just a quick fix. The side-effects MUST be checked!
    - tested on zTeam ex802
    IT WORKS!
    first of all thanks.
    but MsgOutput is not defined in my files can you send me it? thanks again.

  5. #5
    Member ispyder is offline
    MemberRank
    Aug 2015 Join Date
    76Posts

    Re: Its a GM Thang

    Instead of MsgOutput try Chat.Message:

    Chat.Message(1, lpObj, "Cannot attack GM!");

    Chat.Message(1, lpTargetObj, "%s tried to attack you!", lpObj->Name);
    Also, it would be a good idea to rename the thread to something similar to:
    [How to] Disable GM attacks
    to be easier for others to find the solution if they need it.
    Last edited by ispyder; 13-05-20 at 01:24 PM.

  6. #6
    Member omercohen122 is offline
    MemberRank
    Apr 2015 Join Date
    50Posts

    Re: Its a GM Thang

    Quote Originally Posted by ispyder View Post
    Instead of MsgOutput try Chat.Message:



    Also, it would be a good idea to rename the thread to something similar to:


    to be easier for others to find the solution if they need it.
    Sure thing, all works now. thank you very much !



Advertisement