SA-MP Forums Archive
register dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: register dialog (/showthread.php?tid=161553)



register dialog - Kar - 20.07.2010

when people register in there file it says password = blank

e.g virus chillz file no pass? and i
Код:
Password=
Score=0
Money=0
AdminLevel=5
Hourslogged=0
MinutesLogged=24
SecondsLogged=18
WantedLevel=0
DrunkLevel=0
FightStyle=4
Weed=0
Seeds=0
Angle=3.000000
Kills=0
Deaths=7
pawn Код:
if(dialogid == 2 || dialogid == 12345)
        {
            if(strlen(inputtext))
            {
                new ppw[20], str[128];
                format(pfile, sizeof(pfile), pfile_path, Playername(playerid));
                if(dini_Exists(pfile)) return SendMsg(playerid, RED, "*Error: This Username Is Already Registered In Our Database Please Login! Or Create A Different Account");
                else
                {
                    format(pfile, sizeof(pfile), pfile_path, Playername(playerid));
                    dini_Create(pfile);
                    dini_Set(pfile, "Password", ppw);
                    dini_IntSet(pfile, "Score", 0);
                    dini_IntSet(pfile, "Money", 0);
                    dini_IntSet(pfile, "AdminLevel", 0);
                    dini_IntSet(pfile, "Hourslogged", 0);
                    dini_IntSet(pfile, "MinutesLogged", 0);
                    dini_IntSet(pfile, "SecondsLogged", 0);
                    dini_IntSet(pfile, "WantedLevel", 0);
                    dini_IntSet(pfile, "DrunkLevel", 0);
                    dini_IntSet(pfile, "FightStyle", 0);
                    dini_IntSet(pfile,"Weed", 0);
                    dini_IntSet(pfile,"Seeds", 0);
                    dini_IntSet(pfile, "Jail", 0);

                    format(str, sizeof(str), "*SERVER: You Has Successfully Registered %s(%d) And With The Password Of %s", Playername(playerid), ppw);
                    SendMsg(playerid, GREEN, str);
                    GivePlayerMoney(playerid,25000);
                }
            }
            else
            {
                new regstring[128];
                new regname[64];
                GetPlayerName(playerid,regname,sizeof(regname));
                format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);
                ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Cancel");
            }
        }



Re: register dialog - KJ1 - 20.07.2010

Код:
 dini_Set(pfile, "Password", 0);



Re: register dialog - X_O3NA_X - 20.07.2010

Redo The Script Allover again


Re: register dialog - Kar - 20.07.2010

C:\DOCUME~1\Karim\MYDOCU~1\GRANDT~1\SA-MPS~1\GAMEMO~1\COPSAR~1.pwn(3799) : error 035: argument type mismatch (argument 3)


Re: register dialog - KJ1 - 20.07.2010

can you show me line 3799?


Re: register dialog - Kar - 20.07.2010

this dini_Set(pfile, "Password", ppw);

obviously?

<.< but fuck it i give up on this login and reg dialog its fucking with me either regiter not creating pass and login cmd can login with any pass<.< or not login at all