PDA

View Full Version : Account system + zombie



Rocky
12th February 2014, 11:17
Hello i tried my accounts.. and 1 problem,when round restart.. the account don't show again.. how i can fix it?

Tally
12th February 2014, 11:51
Hello i tried my accounts.. and 1 problem,when round restart.. the account don't show again.. how i can fix it?

We can have no idea unless you post examples of your code.

IzNoGoD
12th February 2014, 17:00
I specifically spent time designing a nice flowchart for this:
http://killtube.org/attachment.php?attachmentid=571&d=1387936894
and writing the text that applies to it:
http://killtube.org/showthread.php?1740-READ-BEFORE-POSTING-Guide-on-asking-for-help

and you choose to ignore all that?

Good luck finding someone else to solve your problems.

Mitch
12th February 2014, 17:50
Hello i tried my accounts.. and 1 problem,when round restart.. the account don't show again.. how i can fix it?


writing the text that applies to it:
http://killtube.org/showthread.php?1740-READ-BEFORE-POSTING-Guide-on-asking-for-help

and you choose to ignore all that?

Good luck finding someone else to solve your problems.

Like IzNoGod says explain what your problem is. Like what kind of system does your account system use? mysql? openfile? How does your account system work? From where do you call the thread or however you do it?

Have you search on the forum for related problems?

Rocky
12th February 2014, 18:59
level notify("connected", self);

thread maps\mp\gametypes\_login::precache();

if(!level.splitscreen)
iprintln(&"MP_CONNECTED", self);

lpselfnum = self getEntityNumber();
lpGuid = self getGuid();
logPrint("J;" + lpGuid + ";" + lpselfnum + ";" + self.name + "\n");

if(game["state"] == "intermission")
{
spawnIntermission();
return;
}

level endon("intermission");

if(level.splitscreen)
scriptMainMenu = game["menu_accountmenu"];
else
scriptMainMenu = game["menu_accountmenu"];

if(isDefined(self.pers["team"]) && self.pers["team"] != "spectator")
{
self setClientCvar("ui_allow_weaponchange", "1");

if(self.pers["team"] == "allies")
self.sessionteam = "allies";
else
self.sessionteam = "axis";

if(isDefined(self.pers["weapon"]))
spawnPlayer();
else
{
spawnSpectator();

if(self.pers["team"] == "allies")
{
self openMenu(game["menu_weapon_allies"]);
scriptMainMenu = game["menu_weapon_allies"];
}
else
{
self openMenu(game["menu_weapon_axis"]);
scriptMainMenu = game["menu_weapon_axis"];
}
}
}
else
{
self setClientCvar("ui_allow_weaponchange", "0");

if(!isDefined(self.pers["skipserverinfo"]))
self openMenu(game["menu_accountmenu"]);

self.pers["team"] = "spectator";
self.sessionteam = "spectator";

spawnSpectator();
}
self setClientCvar("g_scriptMainMenu", scriptMainMenu);
self thread maps\mp\gametypes\_mod::time_played();
}

Okey.. here is all ok.. but it open accountmenu and then if round restart.. account don't show again.. how i can add to it open when u chose weapon or something..

Thanks

Tally
12th February 2014, 19:26
Here's why:


if(!isDefined(self.pers["skipserverinfo"]))
self openMenu(game["menu_accountmenu"]);


On round 2, self.pers["skipserverinfo"] is defined. So, you wont open the account menu.

Create a round timer, and put it in the round-based gametype files, in the endRound() function to increment each time a round is complete. Then, make exceptions in onPlayerConnect() - when round 2 or above, open the account menu.

IzNoGoD
12th February 2014, 22:58
Or just save your data in player.pers[] array.

Rocky
13th February 2014, 18:03
its opening acc at connec...but if round restart,account don't show 2 times.. i need when u take team,choose weapon then the acc show..

Tally
14th February 2014, 10:34
its opening acc at connec...but if round restart,account don't show 2 times.. i need when u take team,choose weapon then the acc show..

Yes, we understood you the first time. No need to repeat yourself.

I gave you the answer above. Please try to help yourself instead of posting repeat explanations of your problem.