Well this is not very subtle and it is very easy to bypass with reverse engineer, more has another way simpler and better to make with check by server side :P
Try this basic example I did to new source code
Add code in red
WarZ.sln
Code:
// search in active games
const GBPKT_M2C_GameData_s* gdata = gMasterServerLogic.FindGameById(m_joinGameServerId);
if(gdata)
{
foundGameInMaster = true;
if(gdata->info.flags & GBGameInfo::SFLAGS_Passworded)
needPassword = true;
if(gdata->info.mapId == GBGameInfo::MAPID_ServerTest && gUserProfile.ProfileData.PremiumAcc == 0) // By Yuri-BR
{
Scaleform::GFx::Value var[3];
var[0].SetString("You are not allowed to join this server");
var[1].SetBoolean(true);
var[2].SetString("");
gfxMovie.Invoke("_root.api.showInfoMsg", var, 3);
return;
}
WarZ_Server.sln
Code:
if((ginfo_.channel==4 && peer.temp_profile.ProfileData.PremiumAcc == 0) || (ginfo_.mapId == GBGameInfo::MAPID_ServerTest && peer.temp_profile.ProfileData.PremiumAcc == 0))
{
PKT_S2C_StartGameAns_s n;
n.result = PKT_S2C_StartGameAns_s::RES_Failed;
p2pSendRawToPeer(peerId, &n, sizeof(n));
DisconnectPeer(peerId, true, "Premium required");
return;
}