Change Outfit

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! SazanOFF94 is offline
    MemberRank
    Apr 2013 Join Date
    RussianZLocation
    216Posts

    Change Outfit

    Hello, living creature was able to implement this feature, I'm racking my head a few weeks, here is my code, the ability does not come out when I click apply outfit, nothing happens (((
    void FrontendWarZ::eventChangeOutfit(r3dScaleformMovie* pMovie, const Scaleform::GFx::Value* args, unsigned argCount)
    {
    PlayerCreateLoadout.HeroItemID = args[0].GetInt();
    PlayerCreateLoadout.HeadIdx = args[1].GetInt();
    PlayerCreateLoadout.BodyIdx = args[2].GetInt();
    PlayerCreateLoadout.LegsIdx = args[3].GetInt();


    m_Player->UpdateLoadoutSlot(gUserProfile.ProfileData.ArmorySlots[gUserProfile.SelectedCharID]);
    }


  2. #2
    Valued Member NeoZero is offline
    MemberRank
    May 2013 Join Date
    BrazilLocation
    113Posts

    Re: Change Outfit

    There are some problems with your code.
    First of all, it seems you just copied the eventCreateChangeCharacter code. This won't work.
    Also, have you registered the callback for this event?
    The args[0] for eventChangeOutfit isn't HeroItemID, it's CharID.
    The last line of the code will do nothing since you're changing PlayerCreateLoadout, not gUserProfile.ProfileData.ArmorySlots.
    And even if you fix your code, those changes won't be updated in your database. You'll need to create a stored procedure to update it in your database and call it through the webAPI.

  3. #3
    Account Upgraded | Title Enabled! SazanOFF94 is offline
    MemberRank
    Apr 2013 Join Date
    RussianZLocation
    216Posts

    Re: Change Outfit

    Quote Originally Posted by NeoZero View Post
    There are some problems with your code.
    First of all, it seems you just copied the eventCreateChangeCharacter code. This won't work.
    Also, have you registered the callback for this event?
    The args[0] for eventChangeOutfit isn't HeroItemID, it's CharID.
    The last line of the code will do nothing since you're changing PlayerCreateLoadout, not gUserProfile.ProfileData.ArmorySlots.
    And even if you fix your code, those changes won't be updated in your database. You'll need to create a stored procedure to update it in your database and call it through the webAPI.
    You added Change outfit?

  4. #4
    Valued Member NeoZero is offline
    MemberRank
    May 2013 Join Date
    BrazilLocation
    113Posts

    Re: Change Outfit

    Quote Originally Posted by SazanOFF94 View Post
    You added Change outfit?
    Yes, I did it some time ago.



Advertisement