[ HILFE ] Findet ihr Fehler ?

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
  • Ja hallo zusammen,


    ich versuche mich derzeit an einem Reallife Script nur aus Fun, suche halt eine Herausforderung. Bin auch dafür das ich mir das Scripten erst seit ca. 7 Tage "beigebrecht" habe ziemlich weit.


    Momentan beinhaltet es ein Login-/Register System, Banksyste, paar Befehle und 3 Fraktionen, davon 1 mit HQ und Problemen


    Nun meine Frage / Bitte, kann mir wer helfen das Script von Fehlern zu befreien ? Also Error Codes oder Warnings treten keine auf, bis auf "mafiaduty" weil das Icon nirgends verwendet wird, hat seine bedeutung und sollte nicht entfernt werden. Allerdings liegen meine Probleme eher in den Fraktionen. Und zwar folgendes, die Fraktion Mafia, ich kann keinen Inviten oder zum leader machen, warum ? was ist daran falsch. Ich kann nur leader /Member werden wenn ich mich in der Spielerdatei eintrage, würde diese Funktion aber gerne als "Befehl" haben. Ansätze sind auch schon im Script vorhanden aber funkt. irgendwie nicht :(


    Also in kurz:


    Bitte behebt die Probleme des /invite und den /makeleader Befehl, sodass ein leader jmd. inviten kann und ein Admin jmd. zum leadern machen kann.


    Dann wäre es toll, wenn sich jmd. bereit erklären würde mir ein /members befehl wo nur die Member der Fraktion Mafia sehen können wer von den mafiosen /duty ist.


    Das wäre mir eine große hilfe, denn seit tagen und nöchten finde ich den fehler nicht, verzweifel schon!


    LG Chris



    Hinweis: Das Script findet ihr im nächsten Beitrag, Grund: Maximale Zeichen!

  • Hey Chris,


    hast du Leader überhaupt schon gespeichert?


    Verstehe ich das richtig du suchst auch einen Befehl wo man jemand zum leader machen kann als Admin?


    ocmd:makeleader(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,BLAU,"Du bist kein Admin.");
    new pID, rank, string[128];
    if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,BLAU,"/makeleader [spieler] [Fraktionid]");
    if(rank<0||rank>6)return SendClientMessage(playerid,BLAU,"Bitte gültige Fraktion angeben.");
    pInfo[pID][Fraktion] = rank;
    format(string,sizeof(string),"AdmCmd: %s wurde von%s in eine Fraktion eingeladen.! Fraktion: %d",SpielerName(pID),SpielerName(playerid),rank);
    SendClientMessageToAll(ROT,string);
    SpawnPlayer(pID);
    SpielerSpeichern(pID);
    return 1;
    }

  • [pwn]#include <a_samp>
    #include <dini>
    #include <ocmd>


    #define BLAU 0x0087FFFF
    #define ROT 0xE10000FF
    #define ORANGE 0xFF9600FF
    #define GELB 0xFFFF00FF
    #define KBLAU 0x0019FFFF
    #define PINK 0xFF00EBFF
    #define GRÜN 0x33AA33AA
    #define HBLAU 0x00FFF0FF


    #define DIALOG_BANK 1
    #define DIALOG_BANK_AUSZAHLEN 2
    #define DIALOG_BANK_EINZAHLEN 3
    #define DIALOG_BANK_KONTOSTAND 4
    #define DIALOG_BANK_UEBERWEISEN_Stepp1 5
    #define DIALOG_BANK_UEBERWEISEN_Stepp2 6
    #define DIALOG_TUTORIAL 7
    #define DIALOG_REGISTER 8
    #define DIALOG_LOGIN 9
    #define DIALOG_MAFIAINVITE 10


    //Fraktionsnamen
    #define fraktname1 "LSPD"
    #define fraktname2 "Mafia"
    #define fraktname3 "Medic"
    //Mafia
    #define mafiaspawn 1188.7655,-943.9813,42.7585
    //LSPD
    #define lspdspawn 1520.0, 1541.0, 1655.0
    //Medic / Krankenhaus
    #define medicspawn 1520.0,1568.0,1510.0


    new name[MAX_PLAYER_NAME];
    new pname[MAX_PLAYER_NAME];
    new status;
    new aduty[MAX_PLAYERS];
    new bsnenter;
    new bsnexit;
    new bankenter;
    new bankexit;
    new bank;
    new nbinfo;
    new mafiaenter;
    new mafiaexit;
    new mafiaduty;
    //SONSTIGES
    new tor[2];
    new mafiacar[9];//mafiacar[0], mafiacar[1]
    //Motor
    new engine,lights,alarm,doors,bonnet,boot,objective;
    new bool:Motor[MAX_VEHICLES]=false;


    main()
    {
    print("\n----------------------------------");
    print("Reallife");
    print("----------------------------------\n");
    }



    public OnGameModeInit()
    {
    //Motor
    ManualVehicleEngineAndLights();


    for (new i=0; i< MAX_VEHICLES; i++)
    {
    GetVehicleParamsEx(i,engine,lights,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(i,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
    Motor = false;
    }


    UsePlayerPedAnims();
    bsnexit=CreatePickup(1559,1,362.8524,-75.1179,1001.5078);//BSN- exit
    bsnenter=CreatePickup(1559,1,1199.2235,-918.1543,43.1233);//BSN- enter
    bankenter=CreatePickup(1559,1,1422.1138,-1179.5244,25.9922);//BANK- enter
    bankexit=CreatePickup(1559,1,2304.6921,-16.3389,26.7422);//BANK- exit
    bank=CreatePickup(1274,1,2316.6189,-7.2793,26.7422);//BANK- BANK
    mafiaenter=CreatePickup(1559,1,1496.9890,-687.9006,95.5633);//MAFIA- Enter
    mafiaexit=CreatePickup(1559,1,2324.3892,-1149.2510,1050.7101);//MAFIA- Exit
    mafiaduty=CreatePickup(1239,1,2332.4861,-1143.8540,1054.2969);//MAFIA- Duty
    nbinfo=CreatePickup(1239,1,1715.0115,-1918.4021,13.5666);//NOOB INFO - LS HBF

    Create3DTextLabel("Los Santos\n Bank", BLAU,1422.1138,-1179.5244,25.9922,10,0);
    Create3DTextLabel("BSN\n Eingang",BLAU,1199.2235,-918.1543,43.1233,10,0);


    ShowPlayerMarkers(0);
    DisableInteriorEnterExits();
    SetGameModeText("Reallife");
    AddPlayerClass(0,1715.7155,-1934.2708,13.5693,1.4277,0,0,0,0,0,0); // position;


    AddStaticVehicle(409,1226.2432,-905.7473,42.6997,10.2423,151,151); // auto2

    //fraktautos
    AddStaticVehicle(411,1719.54736328,-1856.97167969,13.37812519,200.00000000,6,1); //Infernus - LS HBF
    AddStaticVehicle(411,1707.97155762,-1857.28771973,13.37858868,201.99462891,6,1); //Infernus - LS HBF
    AddStaticVehicle(411,1704.28796387,-1857.13464355,13.37645245,201.99462891,6,1); //Infernus - LS HBF
    AddStaticVehicle(411,1711.67260742,-1857.26330566,13.37812519,199.99462891,6,1); //Infernus - LS HBF
    AddStaticVehicle(411,1715.43762207,-1856.92602539,13.37812519,199.99462891,6,1); //Infernus - LS HBF
    //Mafiacars
    mafiacar[0]=AddStaticVehicle(560,1527.66906738,-680.80920410,94.55497742,0.00000000,0,0); //Sultan
    mafiacar[1]=AddStaticVehicle(560,1523.60693359,-680.78729248,94.55497742,0.00000000,0,0); //Sultan
    mafiacar[2]=AddStaticVehicle(579,1474.08789062,-667.76446533,94.84864044,90.00000000,0,0); //Huntley
    mafiacar[3]=AddStaticVehicle(579,1473.98596191,-662.79064941,94.84864044,90.00000000,0,0); //Huntley
    mafiacar[4]=AddStaticVehicle(487,1464.59155273,-685.07153320,95.01499939,359.99963379,0,0); //Maverick
    mafiacar[5]=AddStaticVehicle(461,1513.86035156,-678.87432861,94.42449951,252.00000000,0,0); //PCJ-600
    mafiacar[6]=AddStaticVehicle(461,1513.90332031,-682.12304688,94.42449951,251.99890137,0,0); //PCJ-600
    mafiacar[7]=AddStaticVehicle(461,1513.82812500,-680.51660156,94.42449951,251.99890137,0,0); //PCJ-600
    mafiacar[8]=AddStaticVehicle(580,1475.67089844,-678.36425781,94.65752411,0.00000000,0,0); //Stafford
    //Mafia HQ
    CreateObject(1411,1484.12316895,-699.89630127,95.35925293,0.00000000,0.00000000,174.00000000); //object(dyn_mesh_1) (1)
    CreateObject(1411,1481.43750000,-696.74481201,95.35925293,0.00000000,0.00000000,89.99597168); //object(dyn_mesh_1) (2)
    CreateObject(1411,1478.83642578,-693.71093750,95.35925293,0.00000000,0.00000000,179.99450684); //object(dyn_mesh_1) (3)
    CreateObject(1411,1473.56323242,-693.71093750,95.35925293,0.00000000,0.00000000,179.98901367); //object(dyn_mesh_1) (4)
    CreateObject(1411,1468.30480957,-693.70739746,95.35925293,0.00000000,0.00000000,179.98901367); //object(dyn_mesh_1) (5)
    CreateObject(1411,1463.04370117,-693.71093750,95.35925293,0.00000000,0.00000000,179.98901367); //object(dyn_mesh_1) (6)
    CreateObject(1411,1459.54040527,-693.71093750,95.35925293,0.00000000,0.00000000,179.98901367); //object(dyn_mesh_1) (7)
    CreateObject(1411,1470.31433105,-657.24218750,95.35925293,0.00000000,0.00000000,359.98901367); //object(dyn_mesh_1) (8)
    CreateObject(1411,1456.81250000,-685.51849365,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (9)
    CreateObject(1411,1456.81250000,-664.45721436,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (10)
    CreateObject(1411,1456.81250000,-669.72937012,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (11)
    CreateObject(1411,1456.81250000,-674.99542236,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (12)
    CreateObject(1411,1456.81250000,-680.26849365,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (13)
    CreateObject(1411,1456.81250000,-690.79180908,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (14)
    CreateObject(1411,1456.81250000,-659.87091064,95.35925293,0.00000000,0.00000000,89.98901367); //object(dyn_mesh_1) (15)
    CreateObject(1411,1459.80358887,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (16)
    CreateObject(1411,1465.06115723,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (17)
    CreateObject(1411,1528.06530762,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (18)
    CreateObject(1411,1475.57177734,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (19)
    CreateObject(1411,1480.85888672,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (20)
    CreateObject(1411,1486.13989258,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (21)
    CreateObject(1411,1491.41027832,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (22)
    CreateObject(1411,1496.68310547,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (23)
    CreateObject(1411,1501.94628906,-657.24218750,95.35925293,0.00000000,0.00000000,359.97802734); //object(dyn_mesh_1) (24)
    CreateObject(1411,1507.19738770,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (25)
    CreateObject(1411,1512.44689941,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (26)
    CreateObject(1411,1517.71679688,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (27)
    CreateObject(1411,1522.99475098,-657.24218750,95.35925293,0.00000000,0.00000000,359.98352051); //object(dyn_mesh_1) (28)
    CreateObject(1411,1530.85156250,-660.09552002,95.35925293,0.00000000,0.00000000,269.98352051); //object(dyn_mesh_1) (29)
    CreateObject(1411,1530.85156250,-665.36590576,95.35925293,0.00000000,0.00000000,269.98352051); //object(dyn_mesh_1) (30)
    CreateObject(1411,1530.85156250,-670.64776611,95.35925293,0.00000000,0.00000000,269.98352051); //object(dyn_mesh_1) (31)
    CreateObject(1411,1530.85156250,-675.91406250,95.35925293,0.00000000,0.00000000,269.98352051); //object(dyn_mesh_1) (32)
    CreateObject(1411,1530.85156250,-681.19622803,95.35925293,0.00000000,0.00000000,269.98352051); //object(dyn_mesh_1) (33)
    CreateObject(1411,1508.98510742,-699.60937500,95.35925293,0.00000000,0.00000000,179.99597168); //object(dyn_mesh_1) (34)
    CreateObject(1411,1517.73535156,-699.60937500,95.35925293,0.00000000,0.00000000,179.99450684); //object(dyn_mesh_1) (35)
    CreateObject(3749,1497.48339844,-699.83770752,99.60841370,0.00000000,0.00000000,0.00000000); //object(clubgate01_lax) (1)
    CreateObject(1411,1512.48144531,-699.60937500,95.35925293,0.00000000,0.00000000,179.99450684); //object(dyn_mesh_1) (36)
    CreateObject(1411,1487.50683594,-700.25390625,95.35925293,0.00000000,0.00000000,173.99597168); //object(dyn_mesh_1) (38)
    CreateObject(991,1497.44738770,-699.48425293,94.96524048,0.00000000,0.00000000,182.00000000); //object(bar_barriergate1) (1)
    CreateObject(2755,1501.95996094,-699.78588867,95.48148346,0.00000000,0.00000000,0.00000000); //object(dojo_wall) (1)
    CreateObject(2755,1493.01513672,-699.86163330,95.48148346,0.00000000,0.00000000,0.00000000); //object(dojo_wall) (2)
    CreateObject(2755,1492.98767090,-699.40264893,95.48148346,0.00000000,0.00000000,0.00000000); //object(dojo_wall) (3)
    CreateObject(2755,1501.99218750,-699.14550781,95.48148346,0.00000000,0.00000000,0.00000000); //object(dojo_wall) (4)
    //Stadthalle
    CreateObject(970,1504.07214355,-1744.07897949,13.09835625,0.00000000,0.00000000,270.00000000); //object(fencesmallb) (1)
    CreateObject(970,1504.07604980,-1748.18090820,13.09835625,0.00000000,0.00000000,270.00000000); //object(fencesmallb) (2)
    CreateObject(970,1502.01062012,-1742.04077148,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (3)
    CreateObject(970,1497.88732910,-1742.04101562,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (4)
    CreateObject(970,1493.78100586,-1742.02783203,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (5)
    CreateObject(970,1489.66540527,-1742.04443359,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (6)
    CreateObject(970,1485.53454590,-1742.05859375,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (7)
    CreateObject(970,1477.19213867,-1742.07788086,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (8)
    CreateObject(970,1481.34741211,-1743.52148438,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (9)
    CreateObject(970,1473.06591797,-1742.09045410,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (10)
    CreateObject(970,1468.94091797,-1742.08837891,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (11)
    CreateObject(970,1464.82470703,-1742.09069824,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (12)
    CreateObject(970,1460.71240234,-1742.09545898,13.09835625,0.00000000,0.00000000,0.00000000); //object(fencesmallb) (13)
    CreateObject(970,1458.58081055,-1744.12316895,13.09835625,0.00000000,0.00000000,268.00000000); //object(fencesmallb) (14)
    CreateObject(970,1458.44116211,-1748.23315430,13.09835625,0.00000000,0.00000000,267.99499512); //object(fencesmallb) (15)
    CreateObject(1215,1479.08740234,-1743.53796387,13.11119843,0.00000000,0.00000000,0.00000000); //object(bollardlight) (1)
    CreateObject(1215,1483.58642578,-1743.54711914,13.11119843,0.00000000,0.00000000,0.00000000); //object(bollardlight) (2)
    CreateObject(1215,1483.87463379,-1750.82629395,15.00963593,0.00000000,0.00000000,0.00000000); //object(bollardlight) (3)
    CreateObject(1215,1478.48791504,-1759.06591797,17.09557343,0.00000000,0.00000000,0.00000000); //object(bollardlight) (4)
    CreateObject(1215,1478.47265625,-1750.82714844,15.00963593,0.00000000,0.00000000,0.00000000); //object(bollardlight) (5)
    CreateObject(1215,1483.89624023,-1759.06518555,17.09557343,0.00000000,0.00000000,0.00000000); //object(bollardlight) (6)
    //zäune
    tor[1]=CreateObject(987, 1195.7708740234, -948.11596679688, 41.720485687256, 0, 0, 101.99755859375);
    tor[0]=CreateObject(987, 1183.0244140625, -938.5146484375, 41.824035644531, 0, 0, 275.99304199219);
    return 1;
    }


    public OnGameModeExit()
    {
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,2047.4270,1336.5569,10.6719);
    SetPlayerFacingAngle(playerid,188.9284);
    SetPlayerCameraPos(playerid,2047.6205,1333.3314,10.6719);
    SetPlayerCameraLookAt(playerid,2047.4270,1336.5569,10.6719);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    SetPlayerMapIcon( playerid, 12, 1421.9464,-1176.1743,25.9922, 52, 0, MAPICON_LOCAL );


    new Spielerdatei[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    if(dini_Exists(Spielerdatei))
    {
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"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;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    SpielerSpeichern(playerid);
    }
    return 1;
    }


    public OnPlayerSpawn(playerid)
    {
    new Spielerdatei[64];
    GetPlayerName(playerid,name,sizeof(name));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
    SetPlayerSkin(playerid, dini_Int(Spielerdatei,"skin"));
    if(isPlayerInFrakt(playerid,2))
    {
    SetPlayerSkin(playerid, 124);
    SetPlayerPos(playerid,1496.7511,-665.0900,95.6013);
    SetPlayerFacingAngle(playerid,359.1850);
    }
    return 1;
    }


    public OnPlayerDeath(playerid, killerid, reason)
    {
    if(killerid != INVALID_PLAYER_ID)
    {
    SendClientMessage(killerid, ROT, "Du hast ein Verbrechen begangen: Mord.");
    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+2);
    new WantedString[256];
    format(WantedString, sizeof(WantedString), "Aktuelles Wantedlevel: %d", GetPlayerWantedLevel(killerid));
    SendClientMessage(killerid, GELB, WantedString);
    }
    return 1;
    }


    public OnVehicleSpawn(vehicleid)
    {
    return 1;
    }


    public OnVehicleDeath(vehicleid, killerid)
    {
    return 1;
    }


    public OnPlayerText(playerid, text[])
    {
    return 1;
    }


    ocmd:f(playerid,params[])
    {
    new text[128];
    if(sscanf(params,"s",text))return SendClientMessage(playerid,ROT,"/f [text]");
    format(text,sizeof(text),"Member %s: %s",SpielerName(playerid),text);
    for(new i=0; i<GetMaxPlayers(); i++)
    {
    if(IsPlayerConnected(i))
    {
    if(isPlayerInFrakt(i,GetPVarInt(playerid,"Fraktion")))
    {
    SendClientMessage(i,BLAU,text);
    }
    }
    }
    return 1;
    }


    ocmd:invite(playerid,params[])
    {
    new text[128],pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,sizeof(pName));
    if(isPlayerInFrakt(playerid,0))
    {
    SendClientMessage(playerid,ROT,"Du gehörst keiner Fraktion an.");
    return 1;
    }
    if(sscanf(params, "s", text))return SendClientMessage(playerid, BLAU, "/invite [Spieler/ID]");
    if(GetPVarInt(playerid,"Leader") == 1 || GetPVarInt(playerid,"Leader") == 2 || GetPVarInt(playerid,"Leader") == 3)
    {
    new pID,string[280];
    if(sscanf(params,"u",pID))return SendClientMessage(playerid,BLAU,"Benutze: /invite [Spieler/ID]");
    format(string,sizeof(string),"Du wurdest von Leader %s in die Fraktion eingeladen",SpielerName(playerid));
    SendClientMessage(pID,GELB,string);
    format(string,sizeof(string),"Du hast %s in deine Fraktion eingeladen",SpielerName(pID));
    SendClientMessage(playerid,BLAU,string);
    ShowPlayerDialog(pID,DIALOG_MAFIAINVITE,DIALOG_STYLE_MSGBOX,"Invite","Du wurdest in eine Fraktion eingeladen.\nUm beizutreten drücke *Beitreten* wenn nicht *Abbrechen*","Beitreten","Abbrechen");
    SpielerSpeichern(pID);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist kein Leader!");
    }
    return 1;
    }



    EDIT: Diesen beitrag bitte löschen, ist einfach sinnlos, weil er zu lang ist!

  • OKE STOP! wir machen das so, ich stelle euch den /invite Befehl und den /makeleader befehl rein, da die anderen Datein zu laaang sind!!!


    ocmd:invite(playerid,params[])
    {
    new text[128],pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,sizeof(pName));
    if(isPlayerInFrakt(playerid,0))
    {
    SendClientMessage(playerid,ROT,"Du gehörst keiner Fraktion an.");
    return 1;
    }


    if(sscanf(params, "s", text))return SendClientMessage(playerid, BLAU, "/invite [Spieler/ID]");
    if(GetPVarInt(playerid,"Leader") == 1 || GetPVarInt(playerid,"Leader") == 2 || GetPVarInt(playerid,"Leader") == 3)
    {
    new pID,string[280];
    if(sscanf(params,"u",pID))return SendClientMessage(playerid,BLAU,"Benutze: /invite [Spieler/ID]");
    format(string,sizeof(string),"Du wurdest von Leader %s in die Fraktion eingeladen",SpielerName(playerid));
    SendClientMessage(pID,GELB,string);
    format(string,sizeof(string),"Du hast %s in deine Fraktion eingeladen",SpielerName(pID));
    SendClientMessage(playerid,BLAU,string);
    ShowPlayerDialog(pID,DIALOG_MAFIAINVITE,DIALOG_STYLE_MSGBOX,"Invite","Du wurdest in eine Fraktion eingeladen.\nUm beizutreten drücke *Beitreten* wenn nicht *Abbrechen*","Beitreten","Abbrechen");
    SpielerSpeichern(pID);
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist kein Leader!");
    }
    return 1;
    }


    ocmd:makeleader(playerid,params[])
    {
    if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Deine Administrationsrechte sind zu niedrig!");
    new pID,fID;
    if(sscanf(params,"ui",pID,fID))return SendClientMessage(playerid,BLAU,"/makeleader [playerid] [fraktionsid]");
    SetPVarInt(pID,"Leader",fID);
    SendClientMessage(playerid,BLAU,"Spieler wurde erfolgreich zum Leader einer Fraktion gemacht.");
    SpielerSpeichern(pID);
    return 1;
    }


    Edit:
    Fehler im pwn Code behoben


    Solltet ihr weitere Datein brauchen bitte bescheid geben stelle ich euch zur verfügung!!