[Tutorial] Login and Register System - Dialogs - Using Y_INI

Verry nice and good tutorial. I used it on my stunt server i haved.
Reply

hmm how to make Saving Data System, Not Player Data using YINI
Reply

HELP!!! can you help me with this ERROR.....??
heres the error compile

Quote:

D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(16 : error 017: undefined symbol "UserPath"
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(170) : error 017: undefined symbol "UserPath"
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : error 017: undefined symbol "DIALOG_LOGIN"
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : error 017: undefined symbol "COL_WHITE"
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : warning 215: expression has no effect
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : error 001: expected token: "-string end-", but found "-identifier-"
D:\samp03x_svr_R1-2_win32\gamemodes\gangwar.pwn(171) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.

Reply

....
Reply

Code:
*** YSI Error: INI_Open could not find or create file Users/Georgi166.ini
And each relog I have to register again.
Reply

Thanks a lot mate....
I learnt it perfectly now...

Nice tutorial
Reply

....
Reply

Quote:
Originally Posted by Ryan_Bowe
View Post
Make sure you have the User's folder in ScriptFiles.
It should create it itself, no? Anyways gonna create it myself and try.
EDIT: Fixed.
Reply

well its a really helpfull tutorial...
Thanks and nice work mate!
Reply

I'm undoubtedly being retarded and doing something very simple wrong.

If I change the value of Admin of a user, it will duplicate to all other users. Any ideas?
Reply

Thank you very much, you helped me a lot
Reply

Hello, i have some errors:
Quote:

C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : error 017: undefined symbol "PlayerInfo"
C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : warning 215: expression has no effect
C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : error 001: expected token: ";", but found "]"
C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : error 029: invalid expression, assumed zero
C:\Users\HP\Desktop\pawno\gamemodes\test.pwn(214) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Ther is my GM: http://pastebin.com/YtJyPqsf

He said that PlayerInfo is not defined, but, i did.

Thx for helping
Reply

Ok, it was because i define those variable/functions under #if defined FILTERSCRIPT
Reply

Got a problem, when a register, i type for password "a", in the ini it gave me 6422626, and when i log myself in game, i doesn't accept "a".

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_REGISTER:
        {
            if(!response) return Kick(playerid);
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Enregistrement",""COL_RED"Il faut inserer un mot de passe !\n"COL_WHITE"Entrez votre password ci dessous pour enregistrer votre compte","Valider","Quitter");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File, "DONNEES");
                INI_WriteInt(File, "Mot de passe", udb_hash(inputtext));
                INI_WriteInt(File,"Argent",0);
                INI_WriteInt(File,"Skin",0);
                INI_WriteInt(File,"Tue",0);
                INI_WriteInt(File,"Mort",0);
                INI_Close(File);
               
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Validй !",""COL_GREEN"Bienvenue ! Reconnectez vous pour sauvegarder vos stats","Ok","");
            }
        }
        case DIALOG_LOGIN:
        {
            if(!response) return Kick(playerid);
            if(response)
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pMdp])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pArgent]);
                    SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
                    ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Validй!",""COL_GREEN"Connexion rйussie ! Bon jeu !","Ok","");
                }
                else
                {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"Vous avez entrй un mot de passe incorrect.\n"COL_WHITE"Entre votre mot de passe ci dessous pour vous connecter.","Login","Quitter");
                }
                return 1;
            }

        }





    }
    return 1;
Tell me if you want another piece of code
Reply

Please help
Reply

BUMP!!
Reply

This is really buggy. I had the same problem and revamped the whole system and created it from scratch. My suggestion is to re-create it on your own.
Reply

Thank you very much for explaining these basics.
Reply

Quote:
Originally Posted by Binx
View Post
This is really buggy. I had the same problem and revamped the whole system and created it from scratch. My suggestion is to re-create it on your own.
Can you send me your script by PM plz ?
Reply

Quote:

INI_WriteInt(File,"Cash",5000);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_WriteInt(File,"Skin",264);

Why doesn't it give $5000 money ingame when you are making an account? I had to add GivePlayerMoney, but it would be better if that could give money instead. How?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)