Wie einfügen

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
  • Ich habe einige cmd erstelt jedoch weiß ich nicht wie ich mehrere cmd`s einfüge vieleicht kan mir jemand helfen.
    {
    if (strcmp("/Waffen", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du kannst mit dem Befehl /waffename flogende Waffen kaufen.");
    SendClientMessage(playerid, FARBE_ROT, "3 Granaten 500$, 5 Molotov 500$, 100 S. Pistole 550$,");
    SendClientMessage(playerid, FARBE_ROT, "150 S. MP5 700$, 80 S. M4 800$, 45 S. Desert 600$, 15 S. Sniper 6000$.");
    return 1;
    }



    {
    if (strcmp("/granaten", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 3 Granaten für 500$ gekauft.");
    GivePlayerWeapon(playerid, 16, 3);
    GivePlayerMoney(playerid, -500);
    return 1;
    }




    {
    if (strcmp("/Molotov", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 5 Molotov für 500$ gekauft.");
    GivePlayerWeapon(playerid, 18, 5);
    GivePlayerMoney(playerid, -500);
    return 1;
    }



    {
    if (strcmp("/Pistole", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 100 Schuss für 550$ gekauft.");
    GivePlayerWeapon(playerid, 22, 100);
    GivePlayerMoney(playerid, -550);
    return 1;
    }



    {
    if (strcmp("/MP5", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 150 Schuss MP5 für 700$ gekauft.");
    GivePlayerWeapon(playerid, 29, 150);
    GivePlayerMoney(playerid, -700);
    return 1;
    }




    {
    if (strcmp("/M4", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 80 Schuss M4 für 800$ gekauft.");
    GivePlayerWeapon(playerid, 31, 80);
    GivePlayerMoney(playerid, -800);
    return 1;
    }



    {
    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 45 Schuss Desert Eagle für 600$ gekauft.");
    GivePlayerWeapon(playerid, 24, 45);
    GivePlayerMoney(playerid, -600);
    return 1;
    }



    {
    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 15 Schuss Sniper für 6000$ gekauft.");
    GivePlayerWeapon(playerid, 34, 15);
    GivePlayerMoney(playerid, -6000);
    return 1;
    }

    Hobby: Kettenrauchen
    Haufigster gesagter spruch: Nie wieder Alkohol

    2 Mal editiert, zuletzt von Crank ()

  • Probier es so:

    if (strcmp("/Waffen", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du kannst mit dem Befehl /waffename flogende Waffen kaufen.");
    SendClientMessage(playerid, FARBE_ROT, "3 Granaten 500$, 5 Molotov 500$, 100 S. Pistole 550$,");
    SendClientMessage(playerid, FARBE_ROT, "150 S. MP5 700$, 80 S. M4 800$, 45 S. Desert 600$, 15 S. Sniper 6000$.");
    return 1;
    }



    if (strcmp("/granaten", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 3 Granaten für 500$ gekauft.");
    GivePlayerWeapon(playerid, 16, 3);
    GivePlayerMoney(playerid, -500);
    return 1;
    }




    if (strcmp("/Molotov", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 5 Molotov für 500$ gekauft.");
    GivePlayerWeapon(playerid, 18, 5);
    GivePlayerMoney(playerid, -500);
    return 1;
    }



    if (strcmp("/Pistole", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 100 Schuss für 550$ gekauft.");
    GivePlayerWeapon(playerid, 22, 100);
    GivePlayerMoney(playerid, -550);
    return 1;
    }



    if (strcmp("/MP5", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 150 Schuss MP5 für 700$ gekauft.");
    GivePlayerWeapon(playerid, 29, 150);
    GivePlayerMoney(playerid, -700);
    return 1;
    }




    if (strcmp("/M4", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 80 Schuss M4 für 800$ gekauft.");
    GivePlayerWeapon(playerid, 31, 80);
    GivePlayerMoney(playerid, -800);
    return 1;
    }



    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 45 Schuss Desert Eagle für 600$ gekauft.");
    GivePlayerWeapon(playerid, 24, 45);
    GivePlayerMoney(playerid, -600);
    return 1;
    }


    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 15 Schuss Sniper für 6000$ gekauft.");
    GivePlayerWeapon(playerid, 34, 15);
    GivePlayerMoney(playerid, -6000);
    return 1;
    }


    Das Ganze muss unter OnPlayerCommandText() eingefügt werden.

  • Danke für antwort aber dann erhalte ich den bericht:
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(76) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(80) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(85) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(89) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(93) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(97) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(101) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(105) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(110) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(114) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(118) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(122) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(125) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\Untitled.pwn(129) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    14 Errors.
    Zeig doch ma an meinen script wie du das genau meinst:
    #include <a_samp>


    #define FARBE_ROT 0xAA3333AA


    #if defined FILTERSCRIPT


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" CS Mos by Henning");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" CS Mod by Henning");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    // Player Klassen
    SetGameModeText("CS Mod");
    AddPlayerClass(285,2776.2981,-2379.0464,16.2244,88.4118,16,3,4,1,22,22); // CT
    AddPlayerClass(258,2536.9382,-2535.7244,13.6250,268.8935,16,3,4,1,22,22); // T

    //Fahrzeuge
    AddStaticVehicle(601,2777.9729,-2433.9578,13.3965,90.1596,1,1); // swat1
    AddStaticVehicle(601,2778.0356,-2440.1118,13.3948,89.0403,1,1); // swat2
    AddStaticVehicle(528,2758.8315,-2375.5103,13.6769,178.3527,0,0); // FBI
    AddStaticVehicle(497,2774.9885,-2390.8638,19.0606,180.1215,0,1); // PHeli
    AddStaticVehicle(489,2461.5103,-2603.9871,13.8049,268.1043,14,123); // truck 1
    AddStaticVehicle(489,2461.1106,-2609.5408,13.8053,269.1462,120,123); // truck 2
    AddStaticVehicle(489,2461.2163,-2614.3079,13.8056,269.2205,120,123); // truck 3
    AddStaticVehicle(489,2460.8347,-2619.9602,13.8066,268.4834,14,123); // truck 4
    AddStaticVehicle(469,2509.0422,-2629.3987,14.2617,0.0056,1,3); // sparrow
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    SetPlayerPos(playerid, 2715.2871,-2486.3831,29.1932);
    SetPlayerCameraPos(playerid, 2715.2393,-2492.1199,29.1932);
    SetPlayerCameraLookAt(playerid, 2715.2871,-2486.3831,29.1932);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    SetPlayerHealth(playerid, 25);
    SetPlayerArmour(playerid, 25);
    return 1;
    }

    Hobby: Kettenrauchen
    Haufigster gesagter spruch: Nie wieder Alkohol

  • #include <a_samp>


    #define FARBE_ROT 0xAA3333AA


    #if defined FILTERSCRIPT


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" CS Mos by Henning");
    print("--------------------------------------\n");
    return 1;
    }


    public OnFilterScriptExit()
    {
    return 1;
    }


    #else


    main()
    {
    print("\n----------------------------------");
    print(" CS Mod by Henning");
    print("----------------------------------\n");
    }


    #endif


    public OnGameModeInit()
    {
    // Player Klassen
    SetGameModeText("CS Mod");
    AddPlayerClass(285,2776.2981,-2379.0464,16.2244,88.4118,16,3,4,1,22,22); // CT
    AddPlayerClass(258,2536.9382,-2535.7244,13.6250,268.8935,16,3,4,1,22,22); // T

    //Fahrzeuge
    AddStaticVehicle(601,2777.9729,-2433.9578,13.3965,90.1596,1,1); // swat1
    AddStaticVehicle(601,2778.0356,-2440.1118,13.3948,89.0403,1,1); // swat2
    AddStaticVehicle(528,2758.8315,-2375.5103,13.6769,178.3527,0,0); // FBI
    AddStaticVehicle(497,2774.9885,-2390.8638,19.0606,180.1215,0,1); // PHeli
    AddStaticVehicle(489,2461.5103,-2603.9871,13.8049,268.1043,14,123); // truck 1
    AddStaticVehicle(489,2461.1106,-2609.5408,13.8053,269.1462,120,123); // truck 2
    AddStaticVehicle(489,2461.2163,-2614.3079,13.8056,269.2205,120,123); // truck 3
    AddStaticVehicle(489,2460.8347,-2619.9602,13.8066,268.4834,14,123); // truck 4
    AddStaticVehicle(469,2509.0422,-2629.3987,14.2617,0.0056,1,3); // sparrow
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    SetPlayerPos(playerid, 2715.2871,-2486.3831,29.1932);
    SetPlayerCameraPos(playerid, 2715.2393,-2492.1199,29.1932);
    SetPlayerCameraLookAt(playerid, 2715.2871,-2486.3831,29.1932);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    SetPlayerHealth(playerid, 25);
    SetPlayerArmour(playerid, 25);
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])


    if (strcmp("/Waffen", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du kannst mit dem Befehl /waffename flogende Waffen kaufen.");
    SendClientMessage(playerid, FARBE_ROT, "3 Granaten 500$, 5 Molotov 500$, 100 S. Pistole 550$,");
    SendClientMessage(playerid, FARBE_ROT, "150 S. MP5 700$, 80 S. M4 800$, 45 S. Desert 600$, 15 S. Sniper 6000$.");
    return 1;
    }



    if (strcmp("/granaten", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 3 Granaten für 500$ gekauft.");
    GivePlayerWeapon(playerid, 16, 3);
    GivePlayerMoney(playerid, -500);
    return 1;
    }




    if (strcmp("/Molotov", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 5 Molotov für 500$ gekauft.");
    GivePlayerWeapon(playerid, 18, 5);
    GivePlayerMoney(playerid, -500);
    return 1;
    }



    if (strcmp("/Pistole", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 100 Schuss für 550$ gekauft.");
    GivePlayerWeapon(playerid, 22, 100);
    GivePlayerMoney(playerid, -550);
    return 1;
    }



    if (strcmp("/MP5", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 150 Schuss MP5 für 700$ gekauft.");
    GivePlayerWeapon(playerid, 29, 150);
    GivePlayerMoney(playerid, -700);
    return 1;
    }




    if (strcmp("/M4", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 80 Schuss M4 für 800$ gekauft.");
    GivePlayerWeapon(playerid, 31, 80);
    GivePlayerMoney(playerid, -800);
    return 1;
    }



    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 45 Schuss Desert Eagle für 600$ gekauft.");
    GivePlayerWeapon(playerid, 24, 45);
    GivePlayerMoney(playerid, -600);
    return 1;
    }


    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 15 Schuss Sniper für 6000$ gekauft.");
    GivePlayerWeapon(playerid, 34, 15);
    GivePlayerMoney(playerid, -6000);
    return 1;
    }

    Hobby: Kettenrauchen
    Haufigster gesagter spruch: Nie wieder Alkohol


  • #include <a_samp>


    #define FARBE_ROT 0xAA3333AA


    main()
    {
    print("\n----------------------------------");
    print(" CS Mod by Henning");
    print("----------------------------------\n");
    }


    public OnGameModeInit()
    {
    // Player Klassen
    SetGameModeText("CS Mod");
    AddPlayerClass(285,2776.2981,-2379.0464,16.2244,88.4118,16,3,4,1,22,22); // CT
    AddPlayerClass(258,2536.9382,-2535.7244,13.6250,268.8935,16,3,4,1,22,22); // T


    //Fahrzeuge
    AddStaticVehicle(601,2777.9729,-2433.9578,13.3965,90.1596,1,1); // swat1
    AddStaticVehicle(601,2778.0356,-2440.1118,13.3948,89.0403,1,1); // swat2
    AddStaticVehicle(528,2758.8315,-2375.5103,13.6769,178.3527,0,0); // FBI
    AddStaticVehicle(497,2774.9885,-2390.8638,19.0606,180.1215,0,1); // PHeli
    AddStaticVehicle(489,2461.5103,-2603.9871,13.8049,268.1043,14,123); // truck 1
    AddStaticVehicle(489,2461.1106,-2609.5408,13.8053,269.1462,120,123); // truck 2
    AddStaticVehicle(489,2461.2163,-2614.3079,13.8056,269.2205,120,123); // truck 3
    AddStaticVehicle(489,2460.8347,-2619.9602,13.8066,268.4834,14,123); // truck 4
    AddStaticVehicle(469,2509.0422,-2629.3987,14.2617,0.0056,1,3); // sparrow
    return 1;
    }


    public OnPlayerRequestSpawn(playerid)
    {
    SetPlayerPos(playerid, 2715.2871,-2486.3831,29.1932);
    SetPlayerCameraPos(playerid, 2715.2393,-2492.1199,29.1932);
    SetPlayerCameraLookAt(playerid, 2715.2871,-2486.3831,29.1932);
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    SetPlayerHealth(playerid, 25);
    SetPlayerArmour(playerid, 25);
    return 1;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    if (strcmp("/Waffen", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du kannst mit dem Befehl /waffename flogende Waffen kaufen.");
    SendClientMessage(playerid, FARBE_ROT, "3 Granaten 500$, 5 Molotov 500$, 100 S. Pistole 550$,");
    SendClientMessage(playerid, FARBE_ROT, "150 S. MP5 700$, 80 S. M4 800$, 45 S. Desert 600$, 15 S. Sniper 6000$.");
    return 1;
    }



    if (strcmp("/granaten", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 3 Granaten für 500$ gekauft.");
    GivePlayerWeapon(playerid, 16, 3);
    GivePlayerMoney(playerid, -500);
    return 1;
    }




    if (strcmp("/Molotov", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 5 Molotov für 500$ gekauft.");
    GivePlayerWeapon(playerid, 18, 5);
    GivePlayerMoney(playerid, -500);
    return 1;
    }



    if (strcmp("/Pistole", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 100 Schuss für 550$ gekauft.");
    GivePlayerWeapon(playerid, 22, 100);
    GivePlayerMoney(playerid, -550);
    return 1;
    }



    if (strcmp("/MP5", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 150 Schuss MP5 für 700$ gekauft.");
    GivePlayerWeapon(playerid, 29, 150);
    GivePlayerMoney(playerid, -700);
    return 1;
    }




    if (strcmp("/M4", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 80 Schuss M4 für 800$ gekauft.");
    GivePlayerWeapon(playerid, 31, 80);
    GivePlayerMoney(playerid, -800);
    return 1;
    }



    if (strcmp("/Desert", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 45 Schuss Desert Eagle für 600$ gekauft.");
    GivePlayerWeapon(playerid, 24, 45);
    GivePlayerMoney(playerid, -600);
    return 1;
    }


    if (strcmp("/Sniper", cmdtext, true) == 0)
    SendClientMessage(playerid, FARBE_ROT, "Du hast 15 Schuss Sniper für 6000$ gekauft.");
    GivePlayerWeapon(playerid, 34, 15);
    GivePlayerMoney(playerid, -6000);
    return 1;
    }
    return 0;
    }


    Einmal editiert, zuletzt von Bob Kelso ()

  • Dann kommt das hier.
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(57) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(61) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(66) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(70) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(74) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(78) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(82) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(86) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(91) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(95) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(99) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(103) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(106) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(110) : error 010: invalid function or declaration
    C:\Dokumente und Einstellungen\Henning\Desktop\Pawno\CS Mod.pwn(112) : error 010: invalid function or declaration
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

    Hobby: Kettenrauchen
    Haufigster gesagter spruch: Nie wieder Alkohol

  • hier falls es immernochnet klappt ein waffen fs mit menu is au einfacher

    #include <a_samp>
    #include <float>


    #define red 0xFF0000AA
    #define yellow 0xFFFF00AA


    new Menu:FWeapons;
    new Menu:FPistols;
    new Menu:FMicro_SMGs;
    new Menu:FShotguns;
    new Menu:FArmour;
    new Menu:FSMG;
    new Menu:FRifles;
    new Menu:FAssault;
    new Float:health;


    public OnFilterScriptInit()
    {
    print("\n--------------------------------------");
    print(" [FS] Waffenmenu");
    print("--------------------------------------\n");
    FWeapons = CreateMenu("Weapons",1,20,120,150,40);
    AddMenuItem(FWeapons,0,"Pistols");
    AddMenuItem(FWeapons,0,"Micro SMGs");
    AddMenuItem(FWeapons,0,"Shotguns");
    AddMenuItem(FWeapons,0,"Armour");
    AddMenuItem(FWeapons,0,"SMG");
    AddMenuItem(FWeapons,0,"Rifles");
    AddMenuItem(FWeapons,0,"Assault");
    FPistols = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FPistols,0,"Weapons");
    AddMenuItem(FPistols,0,"9mm");
    AddMenuItem(FPistols,0,"Silenced 9mm");
    AddMenuItem(FPistols,0,"Desert Eagle");
    AddMenuItem(FPistols,0,"<back>");
    FMicro_SMGs = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FMicro_SMGs,0,"Weapons");
    AddMenuItem(FMicro_SMGs,0,"Tec9");
    AddMenuItem(FMicro_SMGs,0,"Micro SMG");
    AddMenuItem(FMicro_SMGs,0,"<back>");
    FShotguns = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FShotguns,0,"Weapons");
    AddMenuItem(FShotguns,0,"Shotgun");
    AddMenuItem(FShotguns,0,"Sawnoff Shotgun");
    AddMenuItem(FShotguns,0,"<back>");
    FArmour = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FArmour,0,"Weapons");
    AddMenuItem(FArmour,0,"Body Armour");
    AddMenuItem(FArmour,0,"<back>");
    FSMG = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FSMG,0,"Weapons");
    AddMenuItem(FSMG,0,"SMG");
    AddMenuItem(FSMG,0,"<back>");
    FRifles = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FRifles,0,"Weapons");
    AddMenuItem(FRifles,0,"Rifle");
    AddMenuItem(FRifles,0,"Sniper Rifle");
    AddMenuItem(FRifles,0,"<back>");
    FAssault = CreateMenu("Weapons",1,20,120,150,40);
    SetMenuColumnHeader(FAssault,0,"Weapons");
    AddMenuItem(FAssault,0,"AK47");
    AddMenuItem(FAssault,0,"M4");
    AddMenuItem(FAssault,0,"<back>");
    return 1;
    }


    public OnPlayerCommandText(playerid,cmdtext[])
    {
    new cmd[256];
    new idx;
    cmd = strtok(cmdtext, idx);


    if(strcmp(cmd, "/waffen", true) == 0)
    {
    GetPlayerHealth(playerid, health);
    GetPlayerHealth(playerid, Float:health);
    TogglePlayerControllable(playerid, false);
    SetPlayerHealth(playerid, 100000);
    ShowMenuForPlayer(FWeapons, playerid);
    return 1;
    }
    return 0;
    }



    public OnFilterScriptExit()
    {
    DestroyMenu(Menu:FWeapons);
    DestroyMenu(Menu:FPistols);
    DestroyMenu(Menu:FMicro_SMGs);
    DestroyMenu(Menu:FShotguns);
    DestroyMenu(Menu:FArmour);
    DestroyMenu(Menu:FSMG);
    DestroyMenu(Menu:FRifles);
    DestroyMenu(Menu:FAssault);
    return 1;
    }


    strtok(const string[], &index)
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }


    public OnPlayerSelectedMenuRow(playerid, row)
    {
    new Menu:Current = GetPlayerMenu(playerid);
    if(Current == FWeapons) {
    switch(row){
    case 0:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FPistols, playerid);
    }
    case 1:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FMicro_SMGs, playerid);
    }
    case 2:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FShotguns, playerid);
    }
    case 3:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FArmour, playerid);
    }
    case 4:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FSMG, playerid);
    }
    case 5:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FRifles, playerid);
    }
    case 6:
    if(IsPlayerConnected(playerid))
    {
    ShowMenuForPlayer(FAssault, playerid);
    }
    }
    }
    if(Current == FPistols) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 22, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    GetPlayerWeapon(playerid);
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 23, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 2:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 24, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 3:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    if(Current == FMicro_SMGs) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 32, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 28, 60);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 2:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    if(Current == FShotguns) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 25, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 26, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 2:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    if(Current == FArmour) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    SetPlayerArmour(playerid, 100);
    SendClientMessage(playerid,yellow,"Armour gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    if(Current == FSMG) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 29, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    if(Current == FRifles) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 33, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 34, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 2:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    if(Current == FAssault) {
    switch(row){
    case 0:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 30, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 1:
    if(GetPlayerMoney(playerid) >= 0)
    {
    GivePlayerWeapon(playerid, 31, 500);
    SendClientMessage(playerid,yellow,"Waffe gekauft!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    else
    {
    SendClientMessage(playerid,red,"Du hast nicht genug Geld!");
    ShowMenuForPlayer(FWeapons, playerid);
    }
    case 2:ShowMenuForPlayer(FWeapons, playerid);
    }
    }
    }


    public OnPlayerExitedMenu(playerid)
    {
    TogglePlayerControllable(playerid, true);
    (SetPlayerHealth(playerid, Float:health));
    }