Bitte Helfen Wär Echt Nett

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Fehler



    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(100) : warning 219: local variable "Spielerdatei" shadows a variable at a preceding level
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(106) : error 017: undefined symbol "DIALOG_LOGIN"
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(110) : error 017: undefined symbol "DIALOG_REGISTER"
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : warning 225: unreachable code
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : warning 217: loose indentation
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : error 017: undefined symbol "SpielerInfo"
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : warning 215: expression has no effect
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : error 001: expected token: ";", but found "]"
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : error 029: invalid expression, assumed zero
    D:\GTA - San Andreas\SERVER\gamemodes\TimeToPlayReallife.pwn(114) : fatal error 107: too many error messages on one line


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


    Script
    6 Errors.



    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT



    #include <a_samp>
    #include <dini>



    #if defined FILTERSCRIPT
    #define BLAU 0x0000FFFF
    #define ROT 0xFF0000FF



    #define DIALOG_REGISTER 1
    #define DIALOG_LOGIN 2



    / * Dialoge * /



    / * Scheiße Sie brauchen nicht zu * / berühren
    Lager Path (playerid)
    {
    neue str [128], name [MAX_PLAYER_NAME];
    GetPlayerName (playerid, name, sizeof (name));
    format (str, sizeof (str), Path, name);
    zurück str;
    }



    Vorwärts loadaccount_user (playerid, name [], value []);



    öffentlichen loadaccount_user (playerid, name [], value [])
    {
    INI_String ("Password", pInfo [playerid] [pPass], 129);
    INI_Int ("Kills", pInfo [playerid] [pKills]);
    INI_Int ("EscapeCount", pInfo [playerid] [pEscaped]);
    INI_Int ("GaurdLevel", pInfo [playerid] [pGaurdLevel]);
    INI_Int ("adminlevel", pInfo [playerid] [pAdminLevel]);
    INI_Int ("Banned", pInfo [playerid] [pBanned]);
    INI_Int ("BanReason", pInfo [playerid] [pBanReason]);
    INI_Int ("Money", pInfo [playerid] [pMoney]);
    INI_Int ("WarnCount", pInfo [playerid] [pWarnCount]);
    INI_Int ("KickCount", pInfo [playerid] [pKickCount]);
    INI_Int ("BanCount", pInfo [playerid] [pBanCount]);
    INI_Int ("CaughtCount", pInfo [playerid] [pCaughtCount]);
    INI_Int ("CheatCount", pInfo [playerid] [pCheatCount]);
    return 1;
    }





    enum pInfo



    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
    }



    public OnFilterScriptExit()
    {
    return 1;
    }



    #else



    main()
    {
    print("\n----------------------------------");
    print("TimeToPlayReallife[Ger]");
    print("----------------------------------\n");
    }







    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("ReallifeMode");
    AddPlayerClass(0,2121.8354,1483.2545,10.8203,268.5161,0,0,0,0,0,0); // pos
    AddPlayerClass(108,2121.8354,1483.2545,10.8203,268.5161,15,200,0,0,0,0); // pos
    return 1;
    }



    public OnGameModeExit()
    {
    return 1;
    }



    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,2121.8354,1483.2545,10.8203);
    SetPlayerFacingAngle(playerid,268.5161);
    SetPlayerCameraPos(playerid,2124.1204,1483.0582,10.8203);
    SetPlayerCameraLookAt(playerid,2121.8354,1483.2545,10.8203);
    return 1;
    }



    public OnPlayerConnect(playerid)
    {
    {
    if(IsPlayerNPC(playerid))return 1;
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    if(dini_Exists(Spielerdatei))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
    }
    else
    {
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
    }
    return 1;
    }
    SpielerInfo[playerid][Level] = 0;
    }



    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    SpielerSpeichern(playerid);
    }
    return 1;
    }
    new Spielerdatei[64]; //Dies wird die Datei sein in die wir speichern werden.



    forward Speichern(playerid);
    public Speichern(playerid)
    {
    new SpielerName[MAX_PLAYER_NAME]; //DIESE VARIABLE BENÖTIGEN WIR UM DEN SPIELERNAMEN HERAUSZUFINDEN
    GetPlayerName(playerid, SpielerName, sizeof(SpielerName)); //Hier finden wir den Namen heraus
    format(Spielerdatei, sizeof(Spielerdatei),"/Accounts/%s.datei", pName); //Hier wählen wir die Spielerdatei mit dem passenden Namen aus.



    dini_IntSet(Spielerdatei,"Level",SpielerInfo[playerid][Level]); //Hier schreiben wir den Wert des Spielstands in die Datei.
    return 1;
    }



    public OnPlayerDisconnect(playerid, reason)
    {
    Speichern(playerid);
    }
    forward Laden(playerid);
    public Laden(playerid)
    {
    new SpielerName[MAX_PLAYER_NAME]; //DIESE VARIABLE BENÖTIGEN WIR UM DEN SPIELERNAMEN HERAUSZUFINDEN
    GetPlayerName(playerid, SpielerName, sizeof(SpielerName)); //Hier finden wir wieder den Namen heraus
    format(Spielerdatei, sizeof(Spielerdatei),"/Accounts/%s.datei", pName); //Hier wählen wir wieder die Spielerdatei mit dem passenden Namen aus.



    //NUN ABER UMGEKEHRT:



    SpielerInfo[playerid][Level] = dini_Int(Spielerdatei,"Level"); //Hier wird der Spielstand "Level" mit dem in der Datei ersetzt.



    public OnPlayerConnect(playerid, reason)
    {
    SpielerInfo[playerid][Level] = 0;
    Laden(playerid);
    }



    }



    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[])
    {
    {
    if(dialogid==DIALOG_LOGIN)
    {
    if(response==0)
    {
    SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
    Kick(playerid);
    return 1;
    }
    if(response==1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug.");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
    return 1;
    }
    else
    {
    Login(playerid,inputtext);
    return 1;
    }
    }
    }
    if(dialogid==DIALOG_REGISTER)
    {
    if(response==0)
    {
    SendClientMessage(playerid,BLAU,"Du hast den Vorgang abgebrochen.");
    Kick(playerid);
    return 1;
    }
    if(response==1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,BLAU,"Das Passwort war nicht lang genug.");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
    return 1;
    }
    else
    {
    Register(playerid,inputtext);
    return 1;
    }
    }
    }
    return 1;
    }
    }



    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }



    stock Register(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_Create(Spielerdatei);
    dini_Set(Spielerdatei,"Passwort",key);
    SendClientMessage(playerid,BLAU,"Erfolgreich registriert.");
    SetPlayerScore(playerid,0);
    SetPVarInt(playerid,"loggedin",1);
    return 1;
    }



    stock Login(playerid,key[])
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    if(!strcmp(key,dini_Get(Spielerdatei,"Passwort"),false))
    {
    LoadAccount(playerid);
    SendClientMessage(playerid,BLAU,"Erfolgreich eingeloggt.");
    return 1;
    }
    else
    {
    SendClientMessage(playerid,BLAU,"Falsches Passwort.");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
    return 1;
    }



    }



    stock LoadAccount(playerid)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
    GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
    SetPVarInt(playerid,"Adminlevel",dini_Int(Spielerdatei,"Adminlevel"));
    SetPVarInt(playerid,"Fraktion",dini_Int(Spielerdatei,"Fraktion"));
    SetPVarInt(playerid,"Baned",dini_Int(Spielerdatei,"Baned"));
    if(GetPVarInt(playerid,"Baned")==1)
    {
    SendClientMessage(playerid,ROT,"Du bist vom Server gebannt.");
    Kick(playerid);
    }
    SetPVarInt(playerid,"loggedin",1);
    return 1;



    stock SpielerSpeichern(playerid)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    new Spielerdatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(Spielerdatei,"Adminlevel",GetPVarInt(playerid,"Adminlevel"));
    dini_IntSet(Spielerdatei,"Fraktion",GetPVarInt(playerid,"Fraktion"));
    dini_IntSet(Spielerdatei,"Baned",GetPVarInt(playerid,"Baned"));
    }
    return 1;
    }



    stock SpielerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    return 1;
    }