PDA

View Full Version : Account system 2 caracters..



Rocky
1st March 2014, 14:26
Hey here i ripped some acc from botzom.

When someone press 1 it type 11,2 same caracters.

somebody know the prob.?

Loveboy
1st March 2014, 17:41
I am sorry, but that's very shit that some guys publish what guys bought for that.

Rocky
1st March 2014, 17:43
what? This is ripped from botzom.

filthy_freak_
2nd March 2014, 02:19
what? This is ripped from botzom.

Do you really think you're going to get help with something that is stolen?

Why can't you make your own? Its not hard....

Tally
2nd March 2014, 10:13
Do you really think you're going to get help with something that is stolen?

Why can't you make your own? Its not hard....

It's perfectly ok to use someone else's mod or code just as long as you credit the creator for it.

Unless, of course, the creator has made it clear he doesn't want people to use his/her work, in which case don't use it, and find another mod to use.

Tally
2nd March 2014, 10:14
Hey here i ripped some acc from botzom.

When someone press 1 it type 11,2 same caracters.

somebody know the prob.?

I had a look at this mod and couldn't reproduce the error you are talking about. Perhaps you need to make a video of it because I am having difficulty understanding what the error is.

Rocky
2nd March 2014, 10:18
aha... i don't know how to say it.. if you type rocky it show in username or password : rroocckkyy,2 x same,if u press 1

Tally
2nd March 2014, 16:07
Ok, I spent a little bit of time on it and the double entries is caused the way the menu was being monitored - it was basically looping twice for every response. I couldn't figure out why it was doing it so, I simply created a new file for the whole account system and loaded it by via the SAD gametype file. It works now, but it does need a LOT of work. But that is outside what I am prepared to do.

1 thing - you need to define self.lang. This causes a script runtime error saying that self.lang is undefined. As I understood it, it was looking for either English or Hungarian. You will need to invent a way to return the correct language and return which iprintln() should be used.

Tally
2nd March 2014, 21:54
Strange problem with this account system - it only works with filetype ".cfg" - openFile() fails on any other filetype and returns -1. But what is weird is that I have successfully used ".ini", ".txt", and ".inc" filetypes in my Demon Mod. My own account system uses all 3 of those filetypes. I cannot for the life of me work out why they would be failing with this script.

IzNoGoD
2nd March 2014, 22:20
Indeed, I've been using .txt for as long as i can remember, and i've seen modifications to my script using weird extensions...

Rocky
3rd March 2014, 14:28
Wow,Tally you are brilliant :]

guiismiti
5th December 2014, 19:27
Two more things...

Players are not obligated to log in in order to play - they can just escape the login menu and open the ingame menu. If you want to force them to log in, go to _menus.gsc and replace


case "changeteam":
self closeMenu();
self closeInGameMenu();
self openMenu(game["menu_team"]);
break;

with


case "changeteam":
self closeMenu();
self closeInGameMenu();

if(isdefined(self.login))
self openMenu(game["menu_team"]);
else
self openMenu(game["menu_login"]);
break;


And also, the backspace function is not working.

In _account.gsc you need to add this:


else if( response == "backspace" )
{
if( !self.edittext )
{
if( self.lname.size > 0 )
{
self.lname=getsubstr(self.lname,0,self.lname.size-1);
}

self setclientcvar( "loginname", self.lname + "_" );

continue;
}
else
{
if( self.lpw.size > 0 )
{
self.lpw=getsubstr(self.lpw,0,self.lpw.size-1);
}

self setclientcvar( "loginpw", self.lpw + "_" );

continue;
}
}

after this


if( menu == "login" )
{
if( response.size == 1 && issubstr( "0123456789abcdefghijklmnopqrstuvwxyz", response[0] ) )
{
if( !self.edittext )
{
if( self.lname.size < 35 )
self.lname += response;

self setclientcvar( "loginname", self.lname + "_" );

continue;
}
else
{
if( self.lpw.size < 35 )
self.lpw += response;

self setclientcvar( "loginpw", self.lpw + "_" );

continue;
}
}


The backspace thing is based on IzNoGod's acc system.

guiismiti
6th December 2014, 00:19
actually, ignore this



case "changeteam":
self closeMenu();
self closeInGameMenu();

if(isdefined(self.login))
self openMenu(game["menu_team"]);
else
self openMenu(game["menu_login"]);
break;


because, after logging in, each time you try to change team the login menu will show up, even after you're correctly logged in.

guiismiti
7th October 2015, 23:05
Since I'm remaking what I've lost, I'd just like to complement this with a TAB function (to easily switch between the user name and password fields).

This should be included as a menu response under the possible responses for the login and register menus:


else if(response == "tab")
{
if(self.edittext == true)
{
self.edittext = false;
self setclientcvar("loginname", self.lname + "_");
self setclientcvar("loginpw", self.lpw);
continue;
}
else if(self.edittext == false)
{
self.edittext = true;
self setclientcvar("loginname", self.lname);
self setclientcvar("loginpw", self.lpw + "_");
continue;
}
}


And this should be added to both login.menu and register.menu:


execKeyInt 9 { play "mouse_click"; scriptMenuResponse "tab" }

guiismiti
8th October 2015, 00:26
Also, the "Enter" function

Just add to each of the menu files:


execKeyInt 13 { play "mouse_click"; scriptMenuResponse "ok" }

guiismiti
14th October 2015, 02:14
Expanding it a little more with a bad word check on register.

This should be placed after the register menu response:


badword = [];
badword[0] = "badword1";
badword[1] = "badword2";
badword[2] = "badword3";
badword[3] = "badword4";
badword[4] = "badword5";

for(i = 0; i < badword.size; i++)
{
if(issubstr(self.lname, badword[i]))
break;
}

if(i != badword.size)
{
self thread errorMessage("^7Bad word.");
continue;
}

IzNoGoD
14th October 2015, 12:23
Please dont be the asshole that disallows you from using the word fuck in your username...

guiismiti
15th October 2015, 00:58
Please dont be the asshole that disallows you from using the word fuck in your username...

I forgot to mention that I created a highscores menu, which is a table with the top 10 xp, accessed through the ingame menu (should encourage people to play more...).
Well, I wouldnt mind them having the words in their user names if these user names didnt show up in the public board.

And, by the way, I'm brazilian and people tend to use bad words more often here. The average age of the players is lower than the usual.