hallo kannn mir bitte jemand helfen!!!ich bekomme das login/register nicht hin -.-

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
  • #include <a_samp>
    #include <dini>
    #include <CheckpointManager>
    #define DIALOG_REGISTER 1
    #define DIALOG_LOGIN 2
    main()
    {
    print("\n----------------------------------");
    print(" Las Venturas Reallife");
    print("----------------------------------\n");
    }
    public OnGameModeInit()
    {
    SetGameModeText("SoS-1.0(GER)");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    AddStaticVehicle(409,2037.2841,985.2791,10.5375,181.9054,1,1); // auto1
    AddStaticVehicle(409,2037.2068,994.6812,10.5421,180.9089,1,1); // auto2
    AddStaticVehicle(411,2024.1074,1014.8332,10.5476,271.1684,123,1); // auto3
    AddStaticVehicle(415,2023.8584,1001.2562,10.5913,271.6179,36,1); // auto4
    AddStaticVehicle(451,2025.8065,1018.9789,10.5207,266.6230,36,36); // auto5
    AddStaticVehicle(461,2026.5745,986.7028,10.4063,268.2118,43,1); // auto6
    AddStaticVehicle(461,2026.5920,987.5308,10.4058,272.6625,61,1); // auto7
    AddStaticVehicle(461,2026.5333,988.2917,10.4063,269.9155,79,1); // auto8
    AddStaticVehicle(461,2026.7758,989.0473,10.3945,269.4032,36,1); // auto9
    AddStaticVehicle(461,2026.7815,990.3449,10.4048,267.7493,43,1); // auto10
    AddStaticVehicle(468,2025.4828,1331.4189,10.4893,268.2604,53,53); // sanchez1
    AddStaticVehicle(468,2025.5691,1330.6846,10.4886,270.2462,6,6); // sanchez2
    AddStaticVehicle(468,2025.4849,1329.9695,10.4894,271.7238,53,53); // sanchez3
    AddStaticVehicle(468,2025.3411,1329.2566,10.4894,269.8126,6,6); // sanchez4
    AddStaticVehicle(468,2025.3036,1328.5370,10.4893,268.9887,53,53); // sanchez5
    AddStaticVehicle(468,2025.2537,1327.8157,10.4895,269.5271,6,6); // sanchez6
    AddStaticVehicle(468,2025.4072,1327.1028,10.4793,272.0602,53,53); // sanchez7
    AddStaticVehicle(468,2025.3135,1326.3859,10.4885,270.9906,6,6); // sanchez8
    AddStaticVehicle(468,2025.2628,1325.7006,10.4895,269.8908,53,53); // sanchez9
    AddStaticVehicle(468,2025.2444,1324.9813,10.4892,279.1582,6,6); // sanchez10
    AddStaticVehicle(400,2025.5063,1350.7087,10.7309,269.9563,113,1); // Landstalker1
    AddStaticVehicle(471,2025.4353,1323.8759,10.3015,273.5254,120,114); // quad1
    AddStaticVehicle(471,2025.4390,1322.3962,10.3016,271.3931,120,112); // quad2
    AddStaticVehicle(489,2025.3671,1334.3658,10.7678,271.2563,120,123); // Rancher1
    AddStaticVehicle(494,605.2518,814.1761,-43.0739,22.8800,42,30); // positionfunpark1
    AddStaticVehicle(494,610.7958,813.3934,-43.0742,20.8639,54,36); // positionfunpark2
    AddStaticVehicle(494,616.3394,812.1653,-43.0391,16.6206,92,101); // positionfunpark3
    AddStaticVehicle(494,621.6394,810.6788,-43.0610,29.7063,36,117); // positionfunpark4
    AddStaticVehicle(424,628.4285,808.9724,-43.1841,38.6362,3,6); // positionfunpark5
    AddStaticVehicle(424,632.4498,810.7252,-43.1826,41.5345,15,30); // positionfunpark6
    AddStaticVehicle(424,635.9531,811.9050,-43.1892,42.9372,35,61); // positionfunpark7
    AddStaticVehicle(424,639.2196,814.0852,-43.1805,48.1939,2,2); // positionfunpark8
    AddStaticVehicle(568,634.2789,821.7350,-42.4724,130.4221,21,1); // positionfunpark9
    AddStaticVehicle(568,633.0930,825.1213,-42.1059,125.1844,37,0); // positionfunpark10
    AddStaticVehicle(568,632.5355,828.0219,-42.3620,89.6852,56,29); // positionfunpark11
    AddStaticVehicle(568,632.6847,831.6115,-42.7861,80.1559,56,29); // positionfunpark12
    AddStaticVehicle(495,690.7078,907.6014,-39.1253,124.0238,119,122); // position funpark13
    AddStaticVehicle(495,688.0939,911.7718,-39.3914,126.0619,116,115); // position funpark14
    AddStaticVehicle(557,685.4676,917.9650,-40.0135,130.6370,1,1); // position funpark15
    AddStaticVehicle(557,681.1241,921.6044,-40.3911,133.4935,1,1); // position funpark16
    AddStaticVehicle(573,677.9065,925.1738,-40.2588,148.7198,115,43); // position funpark17
    AddStaticVehicle(573,673.8199,926.4831,-40.2395,155.9067,77,18); // position funpark18
    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)
    {
    SendClientMessage(playerid,0xFFFF76FF,"Willkommen auf Las Venturas Reallife(GER)");
    GivePlayerMoney(playerid,5000);
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte dein gewünschtes Passwort ein","Register","Abbrechen");
    return 1;
    }
    public OnPlayerDisconnect(playerid, reason)
    {
    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(cmdtext,"/offroad",true) == 0)
    {
    SetPlayerPos(playerid,619.9077,824.9877,-42.9534); // positionOFFROADPARK
    SendClientMessage(playerid,0xFFFF00FF,"Du hast dich zum Offroadpark geportet!");
    return 1;
    }
    if(strcmp(cmdtext,"/BSN",true)==0)
    {
    SetPlayerPos(playerid,1198.5017,-923.8773,43.0353); //position BSN
    SendClientMessage(playerid,0xFFFF00FF,"Du hast dich zum BSN geportet!");
    return 1;
    }
    if(strcmp(cmdtext,"/restart",true)==0) //für serverrestart /restart
    {
    SendRconCommand("gmx");
    return 1;
    }
    if(strcmp(cmdtext,"/spawn",true)==0) //Port zum Spawn
    {
    SetPlayerPos(playerid,2025.3298,1342.7720,10.8203);
    SendClientMessage(playerid,0xFFFF00FF,"Du hast dich zum Spawn geportet!");
    return 1;
    }
    if(strcmp(cmdtext,"/help",true)==0) //hilfe ;)
    {
    SendClientMessage(playerid,0xFFFF00FF,".::HILFE::.\nBefehle:\n/BSN.\n/offroad.\n/spawn.");
    return 1;
    }
    if(strcmp(cmdtext,"/medizin",true,10)==0)
    SetPlayerHealth(playerid,100);
    SendClientMessage(playerid,0xFFFF00FF,"Du wurdest geheilt!");
    return 1;
    }
    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_REGISTER)
    {
    if(response==0)
    {
    SendClientMessage(playerid,0xFF0000FF,"Du hast den Vorgang abgebrochen!");
    Kick(playerid);
    return 1;
    }
    if(response==1)
    {
    if(!strlen(inputtext))
    {
    SendClientMessage(playerid,0xFF0000FF,"Das Passwort war nicht lang genug!");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte dein gewünschtes Passwort ein","Register","Abbrechen");
    return 1;
    }
    else;
    {
    Register(playerid,inputtext);
    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,0xFF0000FF,"Erfolgreich registriert");
    return 1;
    }
    _______________________________________________________________________________
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(257) : error 036: empty statement
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(259) : error 017: undefined symbol "Register"
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(262) : warning 225: unreachable code
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(262) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(262) : error 004: function "OnPlayerClickPlayer" is not implemented
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(266) : warning 225: unreachable code
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(266) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(266) : error 017: undefined symbol "Register"
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(271) : error 037: invalid string (possibly non-terminated string)
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(271) : error 017: undefined symbol "s"
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(271) : error 029: invalid expression, assumed zero
    C:\Users\kevin\Desktop\Server\gamemodes\NEW.pwn(271) : fatal error 107: too many error messages on one line


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



    10 Errors.
    ___________________________________________________________________________________________________________


  • Als Erstes hätte ich ne Andere Überschrift gewählt wie z.B.: "GUI Login/Register Problem"


    Back @ Topic:
    Es gibt genügend Tutorials mit Copy'n'Paste.. Für die Anfänger unter uns..
    z.B.:[ SCRIPTING ] Einfaches GUI-Login/Registersystem mit PVars
    Ist doch Ganz Easy...
    Naja als ich es am Anfang nicht hinbekommen habe, hab ich mir ein Filterscript gebastelt. Es hat genauso wie Ohne Funktioniert.. und es waren auch keine Errors..


    LG
    Zottelbär


    //Edit: Ja, Ich eigentlich ja auch, aber für die Anfänger unter uns. Mit den Comments.. ach egal habe hier mal n FilterScript geuploadet.. http://pastebin.com/buNRHGcn Hoffe mal du weißt, wie man so eins einfügt oder? 8|

    Einmal editiert, zuletzt von Zottelbär ()