Jump to content
  • 0

pomoc problem s registraci/login system


scrofly

Dotaz

Ahoj

 

Mám v PC jeden register systém ale dělá mi to errory prosim opravite mi to aby to fungovalo :(

tady jsou errory

C:\Users\joseph\Desktop\JFS.pwn(17) : error 038: extra characters on line
C:\Users\joseph\Desktop\JFS.pwn(18) : error 038: extra characters on line
C:\Users\joseph\Desktop\JFS.pwn(19) : error 038: extra characters on line
C:\Users\joseph\Desktop\JFS.pwn(96) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(98) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(121) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(126) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(127) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(130) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(133) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(139) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(149) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(162) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(164) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(166) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(181) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(188) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(209) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(210) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(220) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(231) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(233) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(234) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(237) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(242) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(250) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(289) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(308) : warning 217: loose indentation
C:\Users\joseph\Desktop\JFS.pwn(309) : error 010: invalid function or declaration
Pawn compiler 3.2.3664              Copyright © 1997-2006, ITB CompuPhase


4 Errors.

#include  <a_samp>                                                                                                                                <a_samp>
#include  <dof2>                                                                                                                                <dof2>
#include  <a_http>                                                                                                                               <a_http>
#define                                                  MAILER_URL "geradoresjfs.site90.net/mailer.php" // Archive. Php> upe your <!
#include  <mailer>
#define CONTAS            \
                                                        "PlayersJFS/%s.ini"
#define REGISTRO          \
                                                        (787)
#define LOGIN             \
                                                        (790)
#define MAXPLAYERSJFS     \
                                                        (50) // Server Slots
#define DinheiroInicio    \
                                                        (1000) // Begins with MIL Grana
#define LevelInicio       \
                                                        (1) // Starts with Level 1
#define EmailServidor     \
                                                        ("[email protected]") //Your Email Addres
#define NomeServidor      \
                                                        ("[JFS/SAMP] - Recuperar Senha") // Configure 
#define TAtualizarLevel   \
                                                        (4000) // Time to Upgrade Level, 4 man!
new
        Invalido[MAXPLAYERSJFS],
        Nome[MAX_PLAYER_NAME],
        String[128]
;

new
        Matou[MAXPLAYERSJFS],
        Morreu[MAXPLAYERSJFS],
        Level[MAXPLAYERSJFS],
        Logou[MAXPLAYERSJFS]
;

public OnFilterScriptInit()
{
    SetTimer("AtualizarLevel", TAtualizarLevel, true);
    return true;
}

public OnFilterScriptExit()
{
    for(new i=0; i<MAXPLAYERSJFS; ++i)
    {
                CarregarPlayer(i);
        }
    DOF2_Exit();
    return true;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        if(IsPlayerConnected(killerid))
        {
                Matou[killerid]++;
                Level[killerid] ++;
                GameTextForPlayer(killerid,"~>~~r~Killed + 1 Level.!!!",4000,3);
        }
        if(IsPlayerConnected(playerid))
        {
                GameTextForPlayer(playerid,"~>~~r~Dead - Level 1!!!",4000,3);
                Level[playerid] --;
        }
        return true;
}
public OnPlayerDisconnect(playerid, reason)
{
    SalvarPlayer(playerid);
    return true;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
        if(strfind(cmdtext, "/stats", true) != -1)
        {
                new DialogStatus[250];
                new EmailStats[40];
            GetPlayerName(playerid, Nome, sizeof(Nome));
            format(EmailStats, sizeof(EmailStats), CONTAS, Nome);
                format(String, sizeof(String),"{FFFFFF}In Status {1E90FF}%s\n\n",Nome);
                strcat(DialogStatus, String);
                format(String, sizeof(String),"{FFFFFF}Email: {1E90FF}%s\n", DOF2_GetString(EmailStats,"Email"));
                strcat(DialogStatus, String);
                format(String, sizeof(String),"{FFFFFF}Level: {1E90FF}%d\n", Level[playerid]);
                strcat(DialogStatus, String);
                format(String, sizeof(String),"{FFFFFF}Money: {1E90FF}%d\n", GetPlayerMoney(playerid));
                strcat(DialogStatus, String);
                format(String, sizeof(String),"{FFFFFF}Kills: {1E90FF}%d\n", Matou[playerid]);
                strcat(DialogStatus, String);
                format(String, sizeof(String),"{FFFFFF}Death: {1E90FF}%d\n",Morreu[playerid]);
                strcat(DialogStatus, String);
                format(String, sizeof(String),"{FFFFFF}You've Logout {1E90FF}%d{FFFFFF} In times Server", Logou[playerid]);
                strcat(DialogStatus, String);
                ShowPlayerDialog(playerid, 5732, DIALOG_STYLE_MSGBOX, "{00F6F6}My Info( RG )", DialogStatus, "Close", "");
                return true;
        }
        if(strfind(cmdtext, "/mudaremail", true) != -1)
        {
        if(strlen(cmdtext) == 11)
            return SendClientMessage(playerid, -1, "/mudaremail [EMAIL]");
        strdel(cmdtext, 0, 11);

                GetPlayerName(playerid, Nome, sizeof(Nome));
                format(String, sizeof(String), CONTAS, Nome);
                new Celula[128];

                format(Celula, sizeof(Celula),"JFS Registration System] - You Changed Your Email from %s to %s !!", DOF2_GetString(String,"Email"), cmdtext);
        SendClientMessage(playerid, -1, Celula);
                SendClientMessage(playerid, -1, "Caution! you should check if it's right! you may lose your Account.");

                DOF2_SetString(String,"Email", cmdtext);
        DOF2_SaveFile();
        return true;
        }
    return false;
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, -1, "This server has a FilterScript Created By JFS - Jonathan Feitosa:).");
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(String, sizeof(String), CONTAS, Nome);
        if(!DOF2_FileExists(String))
        {
                format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Unregistered\n\n{FFFFFF} Enter A Password For Your Account Register\n", Nome);
                ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "System Register", String, "Register", "Cancel");
        }
        else
        {
                format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Registered\n\n{FFFFFF} Enter your password correctly in space provided\n", Nome);
        ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "System Login", String, "Login", "Cancel");
        }
        return true;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
          if(dialogid == REGISTRO)
          {
                if(response)
                {
                    if(!strlen(inputtext))
                    {
                                GetPlayerName(playerid, Nome, sizeof(Nome));
                        format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Unregistered\n\n{FFFFFF} Enter A Password For Your Account Register\n", Nome);
                        ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_PASSWORD, "Registration System", String, "Register", "Cancel");
                                return true;
                        }
                        GetPlayerName(playerid, Nome, sizeof(Nome));
                        format(String, sizeof(String), CONTAS, Nome);
                        DOF2_CreateFile(String);
                        DOF2_SetString(String,"Senha",inputtext);
                        DOF2_SetString(String,"Email","EmailDesconfigurado");
                        DOF2_SetInt(String,"Dinheiro", DinheiroInicio);
                        DOF2_SetInt(String,"Level", LevelInicio);
                        DOF2_SetInt(String,"Matou",0);
                        DOF2_SetInt(String,"Admin",0);
                        DOF2_SetInt(String,"Morreu",0);
                        DOF2_SetInt(String,"Logou",0);
                        DOF2_SaveFile();
                        ShowPlayerDialog(playerid, 6783, DIALOG_STYLE_INPUT, "JFS Registration - Set up your Email", "\n\n{1E90FF} Enter Your Email below to complete registration.\n\n{1E90FF} PS: If you lose your password, use to recover there.\n\n", "Configure", "");
                        return true;
                }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Why Do not You got kicked Register If I wanted!!");
            Kick(playerid);
            return true;
        }
      }
      if(dialogid == 6783)
          {
                if(response)
                {
                        GetPlayerName(playerid, Nome, sizeof(Nome));
                        format(String, sizeof(String), CONTAS, Nome);
                        DOF2_SetString(String,"Email", inputtext);
                        DOF2_SaveFile();
                        format(String, sizeof(String), "Configured Email to: %s", DOF2_GetString(String,"Email"));
                        SendClientMessage(playerid, -1, String);
                        format(String, sizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Registered\n\n{FFFFFF} Enter your password correctly to login\n", Nome);
                        ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "System Login", String, "Login", "Cancel");
                        return true;
                }
          }
      if(dialogid == 6784)
          {
                if(response)
                {
                        GetPlayerName(playerid, Nome, sizeof(Nome));
                        format(String, sizeof(String), CONTAS, Nome);
                new Celula[300];
                        format(Celula, sizeof(Celula),
                                "System Registration/Login with via Email Password Recovery - System Created By Jonathan Feitosa \nVisite: www.facebook.com/GoHumorGTA\n\nPassword: %s\n\n\nContato Skype: jonathanfeitosajfs\nContato MSN: [email protected]", DOF2_GetString(String,"Senha"));
                        SendMail(DOF2_GetString(String,"Email"), EmailServidor, NomeServidor, "JFS Projects - Recover Password", Celula);
                        SendClientMessage(playerid, -1, "An email with your password has been sent to your email address successfully.");
                        SendClientMessage(playerid, -1, "PS: The Times They may take about 5 minutes at most.");
                        Kick(playerid);
                }
                else
                {
                        SendClientMessage(playerid, -1, "You would not Send an Email so got kicked :)");
                    Kick(playerid);
                }
                return true;
          }
      if(dialogid == LOGIN)
          {
                if(response)
                {
                    if(!strlen(inputtext))
                    {
                        GetPlayerName(playerid, Nome, sizeof(Nome));
                                format(String, sizeof(String),
                                        "\n{7FFFD4}Nick: {1E90FF}%s Registered\n\n{FFFFFF} Enter your password correctly to login\n", Nome);
                    ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Sistema de Login", String, "Login", "Cancel");
                                SendClientMessage(playerid,0x1E90FFAA,"FIELD BLANK - Enter your password correctly!");
                                return true;
                        }
                        GetPlayerName(playerid, Nome, sizeof(Nome));
                        format(String, sizeof(String), CONTAS, Nome);
                        if(!strcmp(inputtext,DOF2_GetString(String,"Senha"),false))
                        {
                                Logando(playerid);
                            return true;
                        }
                        else
                        {
                            Invalido[playerid] += 1;
                            if(Invalido[playerid] == 5)
                                        return ShowPlayerDialog(playerid, 6784, DIALOG_STYLE_MSGBOX, "JFS registration - Password Recovery", "\n\n{33CCFF}Press 'Submit' to send an email to your email address containing your password.\n\n{7491F6}PS: I hope it's a valid email address, if not, please contact Administrator Owner.\n\n", "Submit", "Cancel");
                            SendClientMessage(playerid,0x00FF00AA,"Incorrect password, If you miss 5 times there will have to recover by Email!");
                                format(String, sizeof(String),
                                        "\n{7FFFD4}Nick: {1E90FF}%s Registered\n\n{FFFFFF} Enter your password correctly to Login\n", Nome);
                                ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "System Login", String, "Login", "Cancel");
                        }
                        return true;
                }
                else
                {
                        SendClientMessage(playerid, 0xFF0000AA, "You do not want to login, for this reason can be kicked");
                        Kick(playerid);
                        return true;
                }
          }
      return true;
}
stock SalvarPlayer(playerid)
{
    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String, sizeof(String), CONTAS, Nome);
    DOF2_SetInt(String,"Dinheiro", GetPlayerMoney(playerid));
    DOF2_SetInt(String,"Level", Level[playerid]);
    DOF2_SetInt(String,"Matou", Matou[playerid]);
    DOF2_SetInt(String,"Morreu", Morreu[playerid]);
    DOF2_SetInt(String,"Logou", Logou[playerid]);
    DOF2_SaveFile();
    return true;
}

stock CarregarPlayer(playerid)
{
    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(String, sizeof(String), CONTAS, Nome);
    GivePlayerMoney(playerid, DOF2_GetInt(String,"Dinheiro"));
    Level[playerid] = DOF2_GetInt(String, "Level");
    Matou[playerid] = DOF2_GetInt(String, "Matou");
    Morreu[playerid] = DOF2_GetInt(String, "Morreu");
    Logou[playerid] = DOF2_GetInt(String, "Logou");
    DOF2_GetString(String, "Email");
    DOF2_SaveFile();
        return true;
}

stock Logando(playerid)
{
   CarregarPlayer(playerid);
   Logou[playerid]++;

   // Here Bote functions when the player is logging. PS: You may be a tutorial system 
   return true;
}

forward AtualizarLevel();
public AtualizarLevel()
{
        for(new i=0; i<MAXPLAYERSJFS; ++i)
    {
        SetPlayerScore(i, Level[i]);
    }
    return true;
}                                                                                                          
Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...