Help On Dialog
#1

I want To Make AnyOne Join Server if he registered a dialog come and tell him login not use /login cmd

help!!!!!!!!! and thanks
Reply
#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
#3

Mine Dini
Reply
#4

Right, gimme one sec and I'll see what I can do for you.

Edit: This tutorial should be of much use as it goes into some detail

https://sampforum.blast.hk/showthread.php?pid=1183891#pid1183891

But if you have the time, learn some MySql its pretty fast but takes some time to learn properly
Reply
#5

ok im waiting
Reply


Forum Jump:


Users browsing this thread: