Jump to content

Emanuel

Membru
  • Posts

    9
  • Joined

  • Last visited

Posts posted by Emanuel

  1. D:\Server\Gaemode 0\gamemodes\GMMINCEPUT.pwn(73) : error 017: undefined symbol "pSQLID"
    D:\Server\Gaemode 0\gamemodes\GMMINCEPUT.pwn(74) : error 017: undefined symbol "pSQLID"

    Acesta sunt erorile care mile ofera.

    Quote

     

    #include <a_samp>

    #include <a_mysql>
    new SQL = -1, gQuery[256];

    #define function%0(%1)    forward %0(%1); public %0(%1)

    enum pInfo {
        pSQLD,
        pName[MAX_PLAYER_NAME],
        pPassword[32],
        pEmail[32],
        pGender
    }
    new PlayerInfo[MAX_PLAYERS][pInfo];

    enum {
        // Register
        DIALOG_REGISTER,
        DIALOG_EMAIL,
        DIALOG_GENDER,

        // Login
        DIALOG_LOGIN
    }

    main() { print("Incercare qEmanuel Gamemodeqemanuel!"); }


    public OnGameModeInit()
    {
        SQL = mysql_connect("localhost", "root", "inceput_db", "");

        // Don't use these lines if it's a filterscript
        SetGameModeText("Blank Script");
        AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
        return 1;
    }

    public OnPlayerRequestClass(playerid, classid)
    {
        SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
        return 1;
    }

    public OnPlayerConnect(playerid) {
        gQuery[0] = EOS;
        mysql_format(SQL, gQuery, sizeof(gQuery), "SELECT * FROM 'users' WHERE 'Name'= %s LIMIT 1", GetName(playerid));
        mysql_tquery(SQL, gQuery, "checkAccont", "i", playerid);
        return 1;
    }

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
        switch(dialogid) {
            case DIALOG_REGISTER: {
                if(!response) 
                    return Kick(playerid);

                if(strlen(inputtext) < 6 || strlen(inputtext) > 32)
                    return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a te puta inregistra (Minim 6 caractere / maxim 32):", "Select", "Canel");

                    gQuery[0] = EOS;
                    mysql_format(SQL, gQuery, sizeof(gQuery), "INSER INTO 'users' ('Name', 'Pasword') VALUES ('%s, '%s')", GetName(playerid), inputtext);
                    mysql_tquery(SQL, gQuery, "insertAccount", "i", playerid);
            }
        }
        return 1;
    }

    function insertAccount(playerid){
        PlayerInfo[playerid][pSQLID] = cache_insert_id();
        printf("%s s-a inregistrat cu SQLID-ul #%d.", GetName(playerid), PlayerInfo[playerid][pSQLID]);
        return 1;
    }

    function checkAccont(playerid){
        switch(cache_num_rows()) {
            case 0:    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register", "Scrie o parola pentru a te puta inregistra (Minim 6 caractere / maxim 32):", "Select", "Canel");
            case 1: ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Scrie parola pentru a te putea juca:", "Select", "Canel");
        }
        return 1;
    }


    stock GetName(playerid) {
        new playerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
        return playerName;
    }

     

    Va rog ajutor

     

  2. C:\Users\Manu-Iahmina\Desktop\L-GM (Localhost)\Gamemode's Files\gamemodes\L-GM.pwn(42) : fatal error 100: cannot read from file: "AutoAFK"

    Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


    1 Error.
    [Finished in 2.3s]

    va rog ajutor, nu sunt un scripter foarte bun va rog ajutatima

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.