Email on register
#1

Hi guys,is possible to ask email at the registration process?
How?
Reply
#2

You can do this by using a dialog. Check these out:

https://sampwiki.blast.hk/wiki/ShowPlayerDialog

https://sampwiki.blast.hk/wiki/OnDialogResponse
Reply
#3

Yes, you need to learn PHP and a_http
Reply
#4

Quote:
Originally Posted by RenSoprano
Посмотреть сообщение
Yes, you need to learn PHP and a_http
Yes, i know but where can i learn about this PHP ?
Reply
#5

I don't see why you need to use PHP for this, you're only asking for their email on registration, but okay...

http://www.w3schools.com/php/default.asp
Reply
#6

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
I don't see why you need to use PHP for this, you're only asking for their email on registration, but okay...

http://www.w3schools.com/php/default.asp
i need PHP for send password at change to Emal , anti hack
Reply
#7

That needs some time to make.
Reply
#8

I know PHP and MySQL but I've learned it for web developing. If you need any help in PHP you can ask me.
Reply
#9

I made this: https://sampforum.blast.hk/showthread.php?tid=429512 a while back for these type of situations.. Just use it with dialogs as realcop said. You can also pass bbcodes through the email as well
Reply
#10

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
That needs some time to make.
Please if you make it , please give me
pawn Код:
if(dialogid == 2) //REGISTER
    {
        if(gPlayerLogged[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
            return 1;
        }
        if(response)
        {
            if(strlen(inputtext) >= 50)
            {
                DisplayDialogForPlayer(playerid, 2); //register
                SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
                return 0;
            }
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new namestring = strfind(sendername, "_", true);
            if(namestring == -1)
            {
                SendClientMessage(playerid, COLOR_YELLOW, "Your name must be in the Firstname_Lastname format.");
                SetTimerEx("kickp", 1000, false, "i", playerid);
                return 1;
   }
            else
            {
                if(!strlen(inputtext))
                {
                    DisplayDialogForPlayer(playerid, 2); //register
                    SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter a password.");
                    return 1;
                }
                new string[128];
                format(string, sizeof(string), "%s.ini", sendername);
//              if(dini_Exists(string))
                if(fexist(string))
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "That name is already taken, please choose a different one.");
                    return 1;
                }
                new tmppass[64];
                strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
                Encrypt(tmppass);
                OnPlayerRegister(playerid,tmppass);
                OnPlayerLogin(playerid,tmppass,inputtext);
                gPlayerAccount[playerid] = 1;
                gPlayerSpawned[playerid] = 1;
                SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
                SendClientMessage(playerid, COLOR_YELLOW, "You have been automaticly refunded, thank you.");
            }
        }
        else
        {
            DisplayDialogForPlayer(playerid, 2); //register
        }
    }
Quote:
Originally Posted by Goldilox
Посмотреть сообщение
I know PHP and MySQL but I've learned it for web developing. If you need any help in PHP you can ask me.
Please i need your help , yeh i need help

pawn Код:
if(dialogid == 2) //REGISTER
    {
        if(gPlayerLogged[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
            return 1;
        }
        if(response)
        {
            if(strlen(inputtext) >= 50)
            {
                DisplayDialogForPlayer(playerid, 2); //register
                SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
                return 0;
            }
            new sendername[MAX_PLAYER_NAME];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new namestring = strfind(sendername, "_", true);
            if(namestring == -1)
            {
                SendClientMessage(playerid, COLOR_YELLOW, "Your name must be in the Firstname_Lastname format.");
                SetTimerEx("kickp", 1000, false, "i", playerid);
                return 1;
   }
            else
            {
                if(!strlen(inputtext))
                {
                    DisplayDialogForPlayer(playerid, 2); //register
                    SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter a password.");
                    return 1;
                }
                new string[128];
                format(string, sizeof(string), "%s.ini", sendername);
//              if(dini_Exists(string))
                if(fexist(string))
                {
                    SendClientMessage(playerid, COLOR_YELLOW, "That name is already taken, please choose a different one.");
                    return 1;
                }
                new tmppass[64];
                strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
                Encrypt(tmppass);
                OnPlayerRegister(playerid,tmppass);
                OnPlayerLogin(playerid,tmppass,inputtext);
                gPlayerAccount[playerid] = 1;
                gPlayerSpawned[playerid] = 1;
                SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
                SendClientMessage(playerid, COLOR_YELLOW, "You have been automaticly refunded, thank you.");
            }
        }
        else
        {
            DisplayDialogForPlayer(playerid, 2); //register
        }
    }
Quote:
Originally Posted by thefatshizms
Посмотреть сообщение
I made this: https://sampforum.blast.hk/showthread.php?tid=429512 a while back for these type of situations.. Just use it with dialogs as realcop said. You can also pass bbcodes through the email as well
i don't know good about php , please ay to me how to make with your Maling.inc ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)