Menu + Dini

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
  • Guten Abend


    Und zwar hab ich ein Problem mit einem Fs das ich geschrieben hab das Probelm immer wen ich /startwar mach geht der server off hier der code
    // This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT


    #include <a_samp>
    #include <dini>


    new Menu:VWar;


    #if defined FILTERSCRIPT


    new Menu:VWar;


    new Menu:ladenmenu;
    new Menu:getraenke;
    new Menu:fastfood;
    new Menu:snacks



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


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
    }


    #endif


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

    VWar = CreateMenu("War Eintragen",2, 200.0, 150.0, 120.0, 50.0);
    AddMenuItem(VWar,0, "Groove Street");
    AddMenuItem(VWar,0, "Ballas");
    AddMenuItem(VWar,0, "La Cosa Nostra");
    AddMenuItem(VWar,0, "Red Soldiers");
    AddMenuItem(VWar,0, "Nd´rangetha");
    AddMenuItem(VWar,0, "V.L.Aztecas");
    AddMenuItem(VWar,0, "Yakuza");



    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


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


    public OnPlayerConnect(playerid)
    {
    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("/startwar", cmdtext, true) == 0)
    {
    ShowMenuForPlayer(VWar, playerid);
    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)
    {
    new Menu:CurrentMenu = GetPlayerMenu(playerid);

    if(CurrentMenu == VWar)
    {
    switch(row)
    {
    case 0:

    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "Groove Street");
    }
    case 1:
    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "Ballas");
    }
    case 2:
    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "La Cosa Nostra");
    }
    case 3:
    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "Red Soldiers");
    }
    case 4:
    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "ND´rangetha");
    }
    case 5:
    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "V.L.Aztecas");
    }
    case 6:
    {
    dini_Set("/scriptfiles/Warinfo/Vagos.ini", "Yakuza");
    }

    }
    }



    return 1;
    }