Email on register
#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


Messages In This Thread
Email on register - by morocco - 07.06.2013, 20:14
Re: Email on register - by Scenario - 07.06.2013, 20:16
Re: Email on register - by RenSoprano - 07.06.2013, 20:20
Re : Re: Email on register - by morocco - 07.06.2013, 20:25
Re: Email on register - by Scenario - 07.06.2013, 20:26
Re : Re: Email on register - by morocco - 07.06.2013, 21:39
Re: Email on register - by gtakillerIV - 07.06.2013, 21:45
Re: Email on register - by Goldilox - 07.06.2013, 22:20
Re: Email on register - by thefatshizms - 07.06.2013, 22:32
Re : Re: Email on register - by morocco - 08.06.2013, 02:10

Forum Jump:


Users browsing this thread: 2 Guest(s)