Help On Dialog
#2

Simply create a dialog under "OnPlayerConnect" but depending on what login & Register system you use will depend on the code.

Example of MYSQL Login/Register from my script:
pawn Код:
public OnPlayerConnect(playerid)
{
    new query[200],pname[24];
    GetPlayerName(playerid,pname,MAX_PLAYER_NAME);

    format(query,sizeof(query),"SELECT UserID FROM Users WHERE Name='%s' LIMIT 1",pname);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        ShowPlayerDialog(playerid,1, DIALOG_STYLE_PASSWORD, "{ffaa00}Server Name Login", "{ffffff}Welcome Back To Server Name \n\nPlease Log In. If This Is Not Your Account Please {ff0000}/quit{ffffff}\nAnd Join With A Different name", "Login", "Cancel"); //Shows our login dialog :)
    }
    else
    {
        ShowPlayerDialog(playerid,2 ,DIALOG_STYLE_INPUT,"{ffaa00}Server Name Registration","{ffffff}Welcome To {FFAA00}Server Name  \n\n{ffffff}To Play Here You Must Create An Account.","Register","Cancel");
    }
    mysql_free_result();

    return 1;
}

I highly suggest the use of MySQL but it's up to you. All you need to worry about is adding the dialogs if you know what you are doing. If you dont know how to modify the script to allow dialog registering I suggest you follow some of the great tutorials created by the kind members of the community.
Reply


Messages In This Thread
Help On Dialog - by Driver546465 - 25.04.2015, 11:41
Re: Help On Dialog - by AaronFarley - 25.04.2015, 11:51
Re: Help On Dialog - by Driver546465 - 25.04.2015, 11:51
Re: Help On Dialog - by AaronFarley - 25.04.2015, 11:53
Re: Help On Dialog - by Driver546465 - 25.04.2015, 11:56

Forum Jump:


Users browsing this thread: 2 Guest(s)