Ausrüsten Problem

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
  • Hallo Leute.


    Ich habe einen kleinen Befehl gemacht, der es ermöglicht den Spielern Waffen zu kaufen. (Zusätzliche Funktionen wie: Position, Ammunation-Geld etc wird noch geadded wenns wieder geht)



    ocmd:ausruesten(playerid,params[])
    {
    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LCN
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Yaku
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Präsident
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)//San NEws
    {
    GivePlayerWeapon(playerid, 41, 2000);
    GivePlayerWeapon(playerid, 43, 50);


    }
    else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//GS
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Balas
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//RS
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//Vagos
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)//Aztecas
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)//Rifa
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)//MWR
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20)//Terror
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24)//O-Amt
    {
    GivePlayerWeapon(playerid, 41, 2000);
    GivePlayerWeapon(playerid, 24, 70);


    }
    return 1;
    }


    Und hier meine Errors:



    Ist der Befehl weg, geht alles!


    Ich hoffe mir hilft jemand. :thumbup:

  • ocmd:ausruesten(playerid,params[])
    {
    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LCN
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Yaku
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)//Präsident
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)//San NEws
    {
    GivePlayerWeapon(playerid, 41, 2000);
    GivePlayerWeapon(playerid, 43, 50);


    }
    else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)//GS
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)//Balas
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)//RS
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)//Vagos
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)//Aztecas
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)//Rifa
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);
    }
    else if(PlayerInfo[playerid][pMember] == 19 || PlayerInfo[playerid][pLeader] == 19)//MWR
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20)//Terror
    {
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 70);
    GivePlayerWeapon(playerid, 25, 70);
    GivePlayerWeapon(playerid, 29, 200);
    GivePlayerWeapon(playerid, 30, 200);


    }
    else if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24)//O-Amt
    {
    GivePlayerWeapon(playerid, 41, 2000);
    GivePlayerWeapon(playerid, 24, 70);
    }
    return 1;
    }


    Rück deine Sachen wenigstens halbwegs richtig ein, Klammerfehler...

    Nur wenn man das Unmögliche versucht kann man das absolut Mögliche erreichen
    Hermann Hesse


    „Was manche Menschen sich selber vormachen, das macht ihnen so schnell keiner nach.”
    Gerhard Uhlenbruck