[FilterScript] Register/login system (Dini, dialogs)
#1

I made this register/login system to learn dini. It's very simple to use/install/copy/steal/change credits.
Is based on dialogs and saves in scriptfiles. Now it has OnGameModeInit because i tested it as a gamemode. You can change it yourself.

You will need Dini and dutils to use this.

Thanks Zh3r0 for help.

Download: http://pastebin.com/FhwbxT5p
Yes, Zh3r0 inspired me to make this.
Reply
#2

But i'm sorry, its FS or GM?

If its FS than why there is:
pawn Code:
public OnGameModeInit()
{
    SetGameModeText("TEST v1.0");
    print("\n--------------------------------------");
    print("Login & Register system. Made by pantelimonfl");
    print("--------------------------------------\n");
    AddPlayerClass(1,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(2,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(269,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(270,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(271,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(272,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(47,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(48,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(49,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(50,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(51,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(52,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(53,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(54,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(55,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(56,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(57,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(58,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    AddPlayerClass(68,1759.0189,-1898.1260,13.5622,266.4503,-1,-1,-1,-1,-1,-1);
    return 1;
}


Edit: you know why i ask'd you? because you're using [FilterScript] tags.
Reply
#3

You should take a look into the code, this wont save the user files.
Reply
#4

Quote:
Originally Posted by pantelimonfl
View Post
I made this register/login system to learn dini. It's very simple to use/install/copy/steal/change credits.
Is based on dialogs and saves in scriptfiles. Now it has OnGameModeInit because i tested it as a gamemode. You can change it yourself.
.
Got it?
Reply
#5

Why you tested it on GM? its FS test it as FS than post it.
Reply
#6

Quote:
Originally Posted by heineken.
View Post
You should take a look into the code, this wont save the user files.
It will...

pawn Code:
public OnPlayerUpdate(playerid)
{
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 1)
            {
                        new string3[64];
                        new playername3[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, playername3, sizeof(playername3));
                        format(string3, sizeof(string3), "%s.ini", playername3);
 
                        dini_IntSet(string3, "Password",PlayerInfo[playerid][Pass]);
                        dini_IntSet(string3, "Level",PlayerInfo[playerid][Level]);
                        dini_IntSet(string3, "Money",PlayerInfo[playerid][Money]);
                }
        }
        return 1;
}
but it's as laggy as it gets, because saving the player's stats every single onplayerupdate, will cause a lot of lag, why not just put it at onplayerdisconnect?
Reply
#7

Dini is slowest file writing/saving system.
This isn't even in english.


Sorry for criticism... keep learning and keep smiling
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)