AutoRecord

Results 1 to 6 of 6
  1. #1
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    AutoRecord

    Figured since I've been sitting on this for months, I'd go ahead and release it. (I won't be telling spefically what lines to add this code to for zoptioninterface only the functions. The reason for this is It doesn't help people learn. By not saying what lines to add it to, it'll require you to mess around with the source if the code doesn't work. Besides, afaik, maiet commented where the buttons, comboboxes, editbox, etc are at)

    Step 1. Open ZOptioninterface.cpp

    Add this in void ZOptionInterface::InitInterfaceOption(void) with the other buttons
    Code:
    		pWidget2 = (MButton*)pResource->FindWidget("AutoRecord");
    		if (pWidget2)
    		{
    			pWidget2->SetCheck(ZGetConfiguration()->GetEtc()->bAutoRecord);
    		}
    Add this in void ZOptionInterface::SaveInterfaceOption(void)

    Code:
    		pWidget2 = (MButton*)pResource->FindWidget("AutoRecord");
    		if (pWidget2)
    		{
    			Z_ETC_AUTORECORD = pWidget2->GetCheck();
    		}
    Step 2:
    Open ZConfiguration.cpp

    Under ZTOK_ETC_FRAMELIMIT_PERSECOND, add this
    Code:
    			childElement.GetChildContents(&m_Etc.bAutoRecord, ZTOK_ETC_AUTORECORD);
    Search for ZTOK_ETC_FRAMELIMIT_PERSECOND again, under it, add this:
    Code:
    		//AutoRecord
    		parentElement.AppendText("\n\t\t");
    		aElement = parentElement.CreateChildElement(ZTOK_ETC_AUTORECORD);
    		sprintf(temp, "%s", m_Etc.bAutoRecord ? "TRUE" : "FALSE");
    		aElement.SetContents(temp);
    Step 3:
    Open ZConfiguration.h

    find struct ZCONFIG_ETC{, inside that, add this
    Code:
    	bool		bAutoRecord;
    Find ZTOK_CONFIG_FRAMELIMIT_PERSECOND, under it add this:
    Code:
    #define ZTOK_ETC_AUTORECORD			"AUTORECORD"
    search for Z_ETC_FRAMELIMIT_PERSECOND, under it add this:
    Code:
    #define Z_ETC_AUTORECORD		(ZGetConfiguration()->GetEtc()->bAutoRecord)
    Step 4:
    Open ZGame.cpp

    inside ZGame::InitRound(), at the top of the function, add this
    Code:
    	
    //sloppy but works fine
    if (ZGetConfiguration()->GetEtc()->bAutoRecord == true && !ZGetGameTypeManager()->IsQuestDerived(ZGetGameClient()->GetMatchStageSetting()->GetGameType()) && !ZGetGame()->IsReplay() && m_bRecording == false) 
    	{
    			ZGetGame()->StartRecording();
    	}
    If you have any problems, just post here & ill try to assist you.
    Last edited by jetman82; 07-03-15 at 06:14 AM.


  2. #2
    Rival Gamers Owner own_prox is offline
    MemberRank
    Jul 2007 Join Date
    HellLocation
    1,077Posts

    Re: AutoRecord

    if (Z_ETC_AUTORECORD)
    ZGetConfiguration()->GetEtc()->bAutoRecord = true;
    else
    ZGetConfiguration()->GetEtc()->bAutoRecord = false;

    not needed you reference it with Z_ETC_AUTORECORD lol your just setting it true twice

  3. #3
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: AutoRecord

    Quote Originally Posted by own_prox View Post
    if (Z_ETC_AUTORECORD)
    ZGetConfiguration()->GetEtc()->bAutoRecord = true;
    else
    ZGetConfiguration()->GetEtc()->bAutoRecord = false;

    not needed you reference it with Z_ETC_AUTORECORD lol your just setting it true twice
    I'm aware of that now, however, it was one of the first thing I coded by myself, & at the time I wasn't aware that it was unnecessary. But I appreciate you telling me that, you had no way of knowing whether or not I knew that. I'll go ahead & change that so peeps understand you don't have to set it that way.
    Last edited by jetman82; 07-03-15 at 06:14 AM.

  4. #4
    I'm retired, I'm already jorklenis2 is offline
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    879Posts

    Re: AutoRecord

    I think we already had the code in "Source of NationaGunZ", but anyway good contribution.

  5. #5
    Account Upgraded | Title Enabled! medotarek is offline
    MemberRank
    Apr 2012 Join Date
    Egypt/RageZoneLocation
    615Posts

    Re: AutoRecord

    missing :O

  6. #6
    TBF Guru jetman82 is offline
    MemberRank
    Jan 2009 Join Date
    631Posts

    Re: AutoRecord

    Was it already in the nationalgunz source? I don't bother checking out source releases on here honestly. I think nationalgunz was just a /autorec command, doesn't function the same as this does. Actually not sure what the point of a /autorec command is, you can ust hit f11 instead of typing :p



Advertisement