Register system issues and change!
#1

Hey everyone!

Currently I am using this saving and register system https://sampforum.blast.hk/showthread.php?tid=273088, just edited it a little bit and it works perfectly but there are some things that I really don't like. That is why I am thinking about re-making the whole register system to a better on - as I am a newbie scripter I need some assistance and scripting help so that's bascially why I create this thread. I really appreciate the help and I will of course give you guys reputation, et cetera. That is just for a thanks though

Alright to the point:

If it is your first time login you will automatically get a register dialog. After you have written in your password you will go to next step there it will ask for what gender your character will be (Male or Female), and then you will have to WRITE in your gender, one of these options and then you will go to next step which is Age. You will have to write in your age between 10 and 90 years, and after that you will be sent to next step where you will be asked for Origin (Where you was born ICly), and after that you will be sent to the spawn and registered to the server.

When you login you may just login and spawn at the spawn, so that is it.

Currently my system just asks for password, and you spawn at the spawn. Also added a non-rp name detector which kick you if you are not using roleplay name (Firstname_Lastname), but the register dialog shows up aswell before you get kicked, also it makes a userfile in the /Accounts/ saving with the username, and that's just messed up.

But I have no clue how I shall start it all when the players connect, because now I have the register and login on PlayerConnect, and incorrect password on OnDialogResponse. So it is all just a mess. How shall I make all the dialogs. I just know how to make a register dialog by the tutorial, not how to first write in password and then proceed to next step which is a new dialog, and then to the third dialog and then to the fourth dialog, and then to the spawn. How?
Reply
#2

BUMP!

pawn Код:
public OnPlayerConnect(playerid)
{

    if(!IsValidName(playerid))
    {
        SendClientMessage(playerid,COLOR_LIGHTRED,"Please change your name into the following format: Firstname_Lastname");
        SetTimerEx("KickPlayer", 6, false, "d", playerid);
    }
   
    SetOriginalColor(playerid);
   
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_GREY1"Welcome to  Role Play",""COLOR_GREY1"SERVER: You have 60 seconds to login \n NOTICE: We are currently under beta testing \n so if you find any bugs, let us know \n\n Enter Your Password:","Login","Cancel");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_GREY1"Welcome to  Role Play",""COLOR_GREY1"Type your password below to register a new account. \n HINT: Do not give out your password to anyone else","Register","Cancel");
    }
    return 1;
}
That is what I have on OnPlayerConnect. As you can see it is just to register and you will spawn at the spawn location I have choosed. But I want to edit it so you will get another dialog up where you have to write in your age. How do I make new dialogs so they will be after the register? :O
Reply
#3

OnPlayerDialogResponse.. under response of register dialog add another ShowPlayerDialog.
Reply
#4

Quote:
Originally Posted by wumpyc
Посмотреть сообщение
OnPlayerDialogResponse.. under response of register dialog add another ShowPlayerDialog.
You don't think I have tried that? I have. And anyways it doesn't send you automatically when you have register in OnPlayerconnect to OnDialogResponse without doing anything. So that was not helpful at all, and it is not just to place "ShowDialog" everywhere. It won't work because when you are getting registered on my gamemode now, you will automatically just spawn at my spawnpoint after you have written in your password.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)