[TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

Results 1 to 9 of 9
  1. #1
    Apprentice hawkingsamcro is offline
    MemberRank
    Nov 2015 Join Date
    In your mindLocation
    23Posts

    idea [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    First, all credits go to Codex.

    In WarZ_Server.sln; MasterServerConfig.cpp

    Look for
    Code:
    void CMasterServerConfig::LoadPermGamesConfig()
    Below you will see something like this
    Code:
    char name[512];
    Below that you will place
    Code:
        int DisableASR;
        int DisableSNP;
    Below of
    Code:
    r3dscpy(name, r3dReadCFG_S(configFile, group, "name", ""));
    You will place
    Code:
        DisableASR = r3dReadCFG_I(configFile, group, "DisableASR", 0);
        DisableSNP = r3dReadCFG_I(configFile, group, "DisableSNP", 0);
    In
    Code:
    ParsePermamentGame(i, name, map, data);
    You change for this
    Code:
    ParsePermamentGame(i, name, map, data,DisableASR,DisableSNP);
    In MasterServerConfig.h you look for this.
    Code:
    void		 ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data);
    And change for this
    Code:
    void		 ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR, int DisableSNP);


    Now you look for this
    Code:
    void CMasterServerConfig::ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data)
    And change for this
    Code:
    void CMasterServerConfig::ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR ,int DisableSNP)
    below you will see something like this
    Code:
    ginfo.flags        = GBGameInfo::SFLAGS_Nameplates | GBGameInfo::SFLAGS_CrossHair | GBGameInfo::SFLAGS_Tracers;
    below, you add
    Code:
      if(channel == 1)      ginfo.flags |= GBGameInfo::SFLAGS_TrialsAllowed;
      if ( DisableASR == 1)
            ginfo.flags |= GBGameInfo::SFLAGS_DisableASR;
      if ( DisableSNP == 1)
            ginfo.flags |= GBGameInfo::SFLAGS_DisableSNP;
    Done.



    MasterServer.cfg Example
    Code:
    [PermGame2]map = MAPID_ServerTest DOESNOTHING GBNET_REGION_US_West 0 0
    data = 20 0 0 2 0 1 0
    name = TEST
    DisableASR = 0 // if 0 enable
    DisableSNP = 0 // if 0 enable
    Last edited by hawkingsamcro; 26-11-15 at 12:37 AM.


  2. #2
    Apprentice naighost0123 is offline
    MemberRank
    Aug 2015 Join Date
    19Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    someting error........

  3. #3
    Apprentice hawkingsamcro is offline
    MemberRank
    Nov 2015 Join Date
    In your mindLocation
    23Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    You forgot to change this

    Look for this
    Code:
    void CMasterServerConfig::ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data)


    And change for

    Code:
    void CMasterServerConfig::ParsePermamentGame(int gameServerId, const char* name, const char* map, const char* data, int DisableASR ,int DisableSNP)

  4. #4
    Apprentice naighost0123 is offline
    MemberRank
    Aug 2015 Join Date
    19Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    but i added all new code

  5. #5
    Apprentice hawkingsamcro is offline
    MemberRank
    Nov 2015 Join Date
    In your mindLocation
    23Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    The picture you sent cannot see anything, but looking the error in that, you forgot to change the ParsePermanent..

  6. #6
    Member Thiago Costa is offline
    MemberRank
    Sep 2013 Join Date
    51Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    It works in src thv2?

  7. #7
    Apprentice hawkingsamcro is offline
    MemberRank
    Nov 2015 Join Date
    In your mindLocation
    23Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    I think yes, you can try.
    If there is any error you post here

  8. #8
    Novice poppians is offline
    MemberRank
    Jan 2016 Join Date
    3Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg



    Hi ! how to change icon for snp

  9. #9
    Apprentice hawkingsamcro is offline
    MemberRank
    Nov 2015 Join Date
    In your mindLocation
    23Posts

    Re: [TUTORIAL]Disable or enable Snipers/Assaults in MasterServer.cfg

    Quote Originally Posted by poppians View Post


    Hi ! how to change icon for snp
    duuno, maybe editing the .fla files, ill take a look on this ( To edit .fla files, u will need the Flash Professional)

    https://mega.nz/#!Gx0hRKQB!nBxBudKnq...UF2jeFPOgmK6V8



Advertisement