[Help]Time limit for map entry

Status
Not open for further replies.
Newbie Spellweaver
Joined
Dec 1, 2015
Messages
19
Reaction score
2
Please help me, thank the brothers!
I would like to know how to open access to the map of the time limit for the players?
For example, the map of the players need to exist for 5 hours to enter?
Please give me the teaching material! Thank you!
 
You mean like a newbie system?

Search in frontend.cpp for trial and premium limitations, you can then modify this to check for account "playtime"

- and -

On entry to the server run a check for "playtime" and kick if doesn't match the criteria. (This is necessary if someone manages to bypass the check previous)
 
Upvote 0
[QUOTE = GetRektBambi; 8541807]You mean like a newbie system?

Search in frontend.cpp for trial and premium limitations, you can then modify this to check for account "playtime"

- and -

On entry to the server run a check for "playtime" and kick if doesn't match the criteria. (This is necessary if someone manages to bypass the check previous)[/ QUOTE]









How can I enable the time limit for the players to get into the map? Thank you for giving me the code!
 
Upvote 0
How can I enable the time limit for the players to get into the map? Thank you for giving me the code!

Hmm, I gave you help which is what this section is actually for, I see no where it say "give codes". Your obviously not a respectful person and the code wont come from me. Have a good day and goodluck.
 
Upvote 0
Hmm, I gave you help which is what this section is actually for, I see no where it say "give codes". Your obviously not a respectful person and the code wont come from me. Have a good day and goodluck.


Oh my God I'm sorry I'm sorry for my mistake and I am very grateful to you for your help! I mean, I need a little help! I apologize for my rudeness!
 
Upvote 0
In future don't assume.

I will assist with the ClientSide serverlist. But will let you work out the ServerSide kick. As remember mentioned above clientside is by-passable where as the server kicking is not.

Search for (FrontEnd.cpp)
if(gdata->info.channel != 4 && !(gdata->info.flags & GBGameInfo::SFLAGS_TrialsAllowed) && gUserProfile.IsTrialAccount()) {
Scaleform::GFx::Value var[3];
var[0].SetString(gLangMngr.getString("CannotJoinGameTrialLimit"));
var[1].SetBoolean(true);
var[2].SetString("");
gfxMovie.Invoke("_root.api.showInfoMsg", var, 3);
return;
}

Below Add
if(gdata->info.mapId == GBGameInfo::MAPID_WZ_Colorado && (gUserProfile.ProfileData.TimePlayed/60/60) < 4) {
Scaleform::GFx::Value var[3];
var[0].SetString("You need to have played for atleast 4 hours to join this map!");
var[1].SetBoolean(true);
var[2].SetString("");
gfxMovie.Invoke("_root.api.showInfoMsg", var, 3);
return;
}

This code will stop any player from joining map WZ_Colorado if they have played for less than 4 hours and pop up a message.
Anything marked in red you can change for you liking or custom map, different time restriction etc..

Goodluck with the rest.
 
Upvote 0
Status
Not open for further replies.
Back