Jump to content

WiDuAlK

V.I.P
  • Posts

    1,338
  • Joined

  • Last visited

  • Days Won

    94

Posts posted by WiDuAlK

  1. [pawn]D:\BlackFlash\gamemodes\BlackFlash.pwn(259) : warning 202: number of arguments does not match definition

    D:\BlackFlash\gamemodes\BlackFlash.pwn(363) : error 002: only a single statement (or expression) can follow each "case"

    Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    1 Error.[/pawn] de ce?

  2. Nick: WiDuAlK

    Problema: Register

    Erori / warnings: [pawn]D:\BlackFlash\gamemodes\BlackFlash.pwn(259) : warning 202: number of arguments does not match definition

    D:\BlackFlash\gamemodes\BlackFlash.pwn(311) : error 001: expected token: ",", but found ";"

    D:\BlackFlash\gamemodes\BlackFlash.pwn(363) : error 002: only a single statement (or expression) can follow each "case"

    Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    2 Errors.[/pawn]

    Lini/script: Cred ca aveti nevoie de tot scriptul:[pawn]// GM BlackFlash

    #include <a_samp>

    #include <dini>

    #define DIALOG_REGISTER1 0

    #define DIALOG_REGISTER2 1

    #define DIALOG_REGISTER3 2

    #define DIALOG_REGISTER4 3

    #define DIALOG_LOGIN1 4

    #define DIALOG_NOPW1 5

    #define DIALOG_NOPW2 6

    #define DIALOG_WRONGPW 7

    enum Info

    {

      sex, //0= male 1=female

      age, // age :3

      logged, // If is player connected

    }

    new pInfo[MAX_PLAYERS][info];

    public OnGameModeInit()

    {

    // 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);

    print("\n----------------------------------");

    print(" Blank Gamemode by your name here");

    print("----------------------------------\n");

    return 1;

    }

    public OnGameModeExit()

    {

    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)

    {

    new pname[MAX_PLAYER_NAME], path[200];

    GetPlayerName(playerid, pname, sizeof(pname));

    format(path, sizeof(path), "/spieler/%s.ini", pname);

    if(!dini_Exists(path))

    {

      // f the player is not registered

      ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT, "Register", "Your Password:", "OK", "Cancel");

    }

    else

    {

      //If the player is registered

        ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT, "Login", "Your Password", "OK", "Cancel");

        }

    return 1;

    }

    public OnPlayerDisconnect(playerid, reason)

    {

        new pname[MAX_PLAYER_NAME], path[200];

    GetPlayerName(playerid, pname, sizeof(pname));

    format(path, sizeof(path), "/spieler/%s.ini", pname);

    dini_IntSet(path, "sex", pInfo[playerid][sex]);

    dini_IntSet(path, "age", pInfo[playerid][age]);

    pInfo[playerid][logged] = 0;

    return 1;

    }

    public OnPlayerSpawn(playerid)

    {

    return 1;

    }

    public OnPlayerDeath(playerid, killerid, reason)

    {

    return 1;

    }

    public OnVehicleSpawn(vehicleid)

    {

    return 1;

    }

    public OnVehicleDeath(vehicleid, killerid)

    {

    return 1;

    }

    public OnPlayerText(playerid, text[])

    {

    return 1;

    }

    public OnPlayerCommandText(playerid, cmdtext[])

    {

    if (strcmp("/mycommand", cmdtext, true, 10) == 0)

    {

    // Do something here

    return 1;

    }

    return 0;

    }

    public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)

    {

    return 1;

    }

    public OnPlayerExitVehicle(playerid, vehicleid)

    {

    return 1;

    }

    public OnPlayerStateChange(playerid, newstate, oldstate)

    {

    return 1;

    }

    public OnPlayerEnterCheckpoint(playerid)

    {

    return 1;

    }

    public OnPlayerLeaveCheckpoint(playerid)

    {

    return 1;

    }

    public OnPlayerEnterRaceCheckpoint(playerid)

    {

    return 1;

    }

    public OnPlayerLeaveRaceCheckpoint(playerid)

    {

    return 1;

    }

    public OnRconCommand(cmd[])

    {

    return 1;

    }

    public OnPlayerRequestSpawn(playerid)

    {

    return 1;

    }

    public OnObjectMoved(objectid)

    {

    return 1;

    }

    public OnPlayerObjectMoved(playerid, objectid)

    {

    return 1;

    }

    public OnPlayerPickUpPickup(playerid, pickupid)

    {

    return 1;

    }

    public OnVehicleMod(playerid, vehicleid, componentid)

    {

    return 1;

    }

    public OnVehiclePaintjob(playerid, vehicleid, paintjobid)

    {

    return 1;

    }

    public OnVehicleRespray(playerid, vehicleid, color1, color2)

    {

    return 1;

    }

    public OnPlayerSelectedMenuRow(playerid, row)

    {

    return 1;

    }

    public OnPlayerExitedMenu(playerid)

    {

    return 1;

    }

    public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)

    {

    return 1;

    }

    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

    {

    return 1;

    }

    public OnRconLoginAttempt(ip[], password[], success)

    {

    return 1;

    }

    public OnPlayerUpdate(playerid)

    {

    return 1;

    }

    public OnPlayerStreamIn(playerid, forplayerid)

    {

    return 1;

    }

    public OnPlayerStreamOut(playerid, forplayerid)

    {

    return 1;

    }

    public OnVehicleStreamIn(vehicleid, forplayerid)

    {

    return 1;

    }

    public OnVehicleStreamOut(vehicleid, forplayerid)

    {

    return 1;

    }

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

    {

        new pname[MAX_PLAYER_NAME], path[200];

    GetPlayerName(playerid, pname, sizeof(pname));

    format(path, sizeof(path), "/spieler/%s.ini", pname);

    switch(dialogid)

    {

      case DIALOG_REGISTER1:

      {

      if(!response)

      {

          Kick(playerid);

      }

      else

      {

        new pwlength = strlen(inputtext);

        if(pwlength > 0)

        {

            dini_Create(path);

            dini_Set(path, "password", inputtext);

            ShowPlayerDialog(playerid, DIALOG_REGISTER2, DIALOG_STYLE_LIST, "male\n\female", "OK", "Cancel");

        }

        else

        {

            ShowPlayerDialog(playerid, DIALOG_NOPW1, DIALOG_STYLE_MSGBOX, "Register", "You have to enter a password!", "OK", "Cancel");

        }

      }

      }

      case DIALOG_REGISTER2:

      {

      if(!response)

      {

        dini_Remove(path);

        Kick(playerid);

      }

      else

      {

        dini_IntSet(path, "sex", listitem);

        ShowPlayerDialog(playerid, DIALOG_REGISTER3, DIALOG_STYLE_INPUT, "Register", "Your Age?", "OK", "Cancel");

      }

      }

      case DIALOG_REGISTER3:

      {

      if(!response)

      {

        dini_Remove(path);

          Kick(playerid);

      }

      else

      {

        dini_Set(path, "age", inputtext);

        ShowPlayerDialog(playerid, DIALOG_REGISTER4, DIALOG_STYLE_MSGBOX, "Register", "Your Register is complete!", "OK", "OK");

          }

      }

      case DIALOG_REGISTER4:

      {

      pInfo[playerid][sex] = dini_Int(path, "sex");

      pInfo[playerid][age] = dini_Int(path, "age");

      pInfo[playerid][logged] = 1;

      }

      case DIALOG_LOGIN1:

      {

      if(!response)

      {

        Kick(playerid);

      }

      else

      {

        new pwlength = strlen(inputtext);

        if(pwlength > 0)

        {

      new pw[200];

      format(pw, sizeof(pw), "%s", dini_Get(path, "password");

            if(strcmp(inputtext, pw) == 0)

            {

              pInfo[playerid][sex] = dini_Int(path, "sex");

              pInfo[playerid][age] = dini_Int(path, "age");

              pInfo[playerid][logged] = 1;

            }

            else

            {

              ShowPlayerDialog(playerid, DIALOG_WRONGPW, DIALOG_STYLE_MSGBOX, "Login", "Wrong Password!", "OK", "Cancel");

            }

        }

        else

        {

            ShowPlayerDialog(playerid, DIALOG_NOPW2, DIALOG_STYLE_MSGBOX,  "Login", "SYou have to enter a password!", "OK", "Cancel");

        }

      }

      }

      case DIALOG_NOPW1:

      {

    if(!response)

    {

        Kick(playerid);

    }

    else

    {

        ShowPlayerDialog(playerid, DIALOG_REGISTER1, DIALOG_STYLE_INPUT,  "Register", "Your Password", "OK",  "Cancel");

    }

      }

      case DIALOG_NOPW2:

      {

    if(!response)

    {

        Kick(playerid);

    }

    else

    {

        ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT,  "Login", "Your Password:", "OK",  "Abbrechen");

    }

      }

      case DIALOG_WRONGPW:

      {

    if(!response)

    {

        Kick(playerid);

    }

    else

    {

        ShowPlayerDialog(playerid, DIALOG_LOGIN1, DIALOG_STYLE_INPUT,    "Login", "Your Password:", "OK",  "Cancel");

        }

    return 1;

    }[/pawn]

    Ai incercat sa rezolvi singur ?: Am rezolvat 9 probleme cu astea sunt 11

  3. Skull" post="162818" timestamp="1401562797"]

    http://www.sa-mp.ro/forum/index.php?topic=28097.0

    http://www.sa-mp.ro/forum/index.php?topic=25669.0

    http://www.sa-mp.ro/forum/index.php?topic=23284.0

    List continua..

    Citeste mai bine. eu am asa ceva , dar vreau sa mi se scrie si varsta playerului si emailul , locul de spawn si daca e baiat sau fata aici scri doar parola de inregistrare si atat

  4. Nume: WiDuAlK

    Nume tutorial: Register

    Descriere: As dori sa imi dati un tutorial sau cv de genu in care sa mi se explice cum fac ca dupa ce imi scriu parola la inregistrare+logare(doar prima data cand esti nou) sa fac un sistem register cu : varsta , oras , stil mers , stil fight , email si orasul in care vrea playerul sa se spawneze. Am un GM doar cu sistem register mysql si as dori un tutorial care sa mearga pe mysql dar si pe dini totodata (daca se poate...)

  5. Nick: WiDuAlK

    Problema: M-a ajutat andy sa fac sistem register mysql si acum as dori sa imi dati un tutorial sau cv de genu in care sa mi se explice cum fac ca dupa ce imi scriu parola la inregistrare+logare(doar prima data cand esti nou) sa fac un sistem register cu : varsta , oras , stil mers , stil fight , email si orasul in care vrea playerul sa se spawneze.

    Erori / warnings: -

    Lini/script: -

    Ai incercat sa rezolvi singur ?: -

  6. [pawn]D:\BlackFlash\gamemodes\GM.pwn(298) : warning 219: local variable "pw" shadows a variable at a preceding level

    D:\BlackFlash\gamemodes\GM.pwn(299) : error 035: argument type mismatch (argument 1)

    D:\BlackFlash\gamemodes\GM.pwn(299) : error 035: argument type mismatch (argument 1)

    D:\BlackFlash\gamemodes\GM.pwn(299) : error 035: argument type mismatch (argument 2)

    D:\BlackFlash\gamemodes\GM.pwn(299) : fatal error 107: too many error messages on one line

    Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    4 Errors.[/pawn]

    am pus asta:

    [pawn]case DIALOG_LOGIN:

      {

      if(!response) Kick(playerid);

      else

      {

            incercari[playerid]++;

            if(incercari[playerid] == 3) return Kick(playerid);

        new pwlength = strlen(inputtext);

        if(pwlength > 3)

        {

            new pw[200];

            format(pw, sizeof(pw), "%s", dini_Get(file, "parola");//stocam parola in variabila pw

            if(strcmp(inputtext, pw) == 0)

            {

                        format(P_Data[MAX_PLAYERS][oras], 30, dini_Get(file, "oras");

                        P_Data[playerid][varsta] = dini_Get(file, "varsta");

                        format(P_Data[MAX_PLAYERS][sex], 20, dini_Get(file, "sex");

                  P_Data[playerid][logged] = 1;

                        SpawnPlayer(playerid);

            }

            else

            {

                  ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_MSGBOX, "Login", "Parola Gresita!", "OK", "Cancel");

            }

        }

        else

        {

            ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_MSGBOX,  "Login", "Trebuie sa introduci o parola", "OK", "Cancel");

        }

      }

      }

    }[/pawn]

  7. Nick: WiDuAlK

    Problema: Register dini (tutorialul lui Gireada)

    Erori / warnings: [pawn]D:\BlackFlash\gamemodes\GM.pwn(298) : error 035: argument type mismatch (argument 1)

    D:\BlackFlash\gamemodes\GM.pwn(298) : error 039: constant symbol has no size

    D:\BlackFlash\gamemodes\GM.pwn(298) : error 035: argument type mismatch (argument 2)

    D:\BlackFlash\gamemodes\GM.pwn(298) : fatal error 107: too many error messages on one line

    Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

    4 Errors.[/pawn]

    Lini/script: Uitati aici tot ce am facut si unde am ajuns http://pastebin.com/cm46T1vm din mai multe Warning si Error cam 26 am ajuns la 4 ERROR si m-am blocat

    Ai incercat sa rezolvi singur ?: Da dar nu imi iese...

  8. in Server_log apare urmatoarea eroare:

    [pawn]----------

    Loaded log file: "server_log.txt".

    ----------

    SA-MP Dedicated Server

    ----------------------

    v0.3z, ©2005-2014 SA-MP Team

    [14:13:19] filterscripts = ""  (string)

    [14:13:19]

    [14:13:19] Server Plugins

    [14:13:19] --------------

    [14:13:19]  Loading plugin: mysql

    [14:13:19]  >> plugin.mysql: R38 successfully loaded.

    [14:13:19]  Loaded.

    [14:13:19]  Loading plugin: Whirlpool

    [14:13:19] 

    [14:13:19]  ==================

    [14:13:19] 

    [14:13:19]  Whirlpool loaded

    [14:13:19] 

    [14:13:19]  ==================

    [14:13:19] 

    [14:13:19]  Loaded.

    [14:13:19]  Loaded 2 plugins.

    [14:13:19]

    [14:13:19] Filterscripts

    [14:13:19] ---------------

    [14:13:19]  Loaded 0 filterscripts.

    [14:13:19] Script[gamemodes/BlackFlash.amx]: Run time error 20: "Invalid index parameter (bad entry point)"

    [14:13:19] Number of vehicle models: 0[/pawn]

    Si mi-am dat seama cum imi descarc baza de date in pc am dat la EXPORT si de acolo a fost simplu:)) dar ziceti cum rezolv UNKDOWN

  9. Am inteles ca e mai usor pe mysql.Puteti sa imi dati un tutorial de creare sistem register pe mysql + cum sa faci datebase si sa meaga. Dar vreau de la 0!!! datimi voi unul sau daca nu gasiti si stiti si vreti sa ma ajutati datimi pm pe Y!M :P.

    Am vazut ca a facut Gireada un sistem register mysql dar eu vreau sa invat de la 0

×
×
  • 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.