/exit <|> Fail?

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
  • Hey.
    Bei einem Haussystem (was im Script war|SunSe Roleplay) geht das /exit 'System' nicht.
    Was ist da Falsch?
    Hoffe ihr könnt mir Helfen!
    House :

    Spoiler anzeigen

    Oben :
    new HouseEntered[MAX_PLAYERS];

    Spoiler anzeigen
    new PlayerInfo[MAX_PLAYERS][pInfo];

    Spoiler anzeigen
    enum hInfo
    {
    Float:hEntrancex,
    Float:hEntrancey,
    Float:hEntrancez,
    Float:hExitx,
    Float:hExity,
    Float:hExitz,
    hHealthx,
    hHealthy,
    hHealthz,
    hArmourx,
    hArmoury,
    hArmourz,
    hOwner[MAX_PLAYER_NAME],
    hDiscription[MAX_PLAYER_NAME],
    hValue,
    hHel,
    hArm,
    hInt,
    hLock,
    hOwned,
    hRooms,
    hRent,
    hRentabil,
    hTakings,
    hVec,
    hVcol1,
    hVcol2,
    hDate,
    hLevel,
    hVW,
    };

    Spoiler anzeigen
    new HouseInfo[250][hInfo];

    Spoiler anzeigen
    enum sInfo
    {
    Float:sEntrancex,
    Float:sEntrancey,
    Float:sEntrancez,
    Float:sExitx,
    Float:sExity,
    Float:sExitz,
    sOwner[MAX_PLAYER_NAME],
    sDiscription[MAX_PLAYER_NAME],
    sValue,
    sInt,
    sLock,
    sOwned,
    sRooms,
    sRent,
    sRentabil,
    sTakings,
    sDate,
    sLevel,
    sVWstan,
    };

    Spoiler anzeigen
    new StanInfo[107][sInfo];

    Spoiler anzeigen
    enum bInfo
    {
    bOwned,
    bOwner[64],
    bMessage[128],
    bExtortion[MAX_PLAYER_NAME],
    Float:bEntranceX,
    Float:bEntranceY,
    Float:bEntranceZ,
    Float:bExitX,
    Float:bExitY,
    Float:bExitZ,
    bLevelNeeded,
    bBuyPrice,
    bEntranceCost,
    bTill,
    bLocked,
    bInterior,
    bProducts,
    bMaxProducts,
    bPriceProd,
    bVWb,
    };
    new BizzInfo[58][bInfo];

    Spoiler anzeigen
    enum sbInfo
    {
    sbOwned,
    sbOwner[64],
    sbMessage[128],
    sbExtortion[MAX_PLAYER_NAME],
    Float:sbEntranceX,
    Float:sbEntranceY,
    Float:sbEntranceZ,
    sbLevelNeeded,
    sbBuyPrice,
    sbEntranceCost,
    sbTill,
    sbLocked,
    sbInterior,
    sbProducts,
    sbMaxProducts,
    sbPriceProd,
    };
    new SBizzInfo[18][sbInfo];

    Spoiler anzeigen
    enum pHaul
    {
    pCapasity,
    pLoad,
    };

    Spoiler anzeigen
    new PlayerHaul[500][pHaul];

    Spoiler anzeigen
    enum pCrime
    {
    pBplayer[32],
    pAccusing[32],
    pAccusedof[32],
    pVictim[32],
    };
    new PlayerCrime[MAX_PLAYERS][pCrime];

    Spoiler anzeigen
    enum iInfo
    {
    iAdmin[128],
    iMOTD[128],
    iPassword[128],
    iNeedPass,
    iLock,
    iPlayers,
    };
    new IRCInfo[10][iInfo];

    Spoiler anzeigen

    public SafeSetPlayerPos(playerid, Float:x, Float:y, Float:z)
    {
    SetPlayerPos(playerid, x,y,z);
    //Streamer_UpdateEx(playerid,x,y,z);
    return 1;
    }

    Spoiler anzeigen
    public SafeSetPlayerInterior(plyid, interiorid)
    {
    SetPlayerInterior(plyid, interiorid);
    PlayerInfo[plyid][pInt] = interiorid;

    Spoiler anzeigen
    if(interiorid == 0)
    {
    PlayerInfo[plyid][pInt] = 0;

    Spoiler anzeigen
    if(HouseEntered[plyid] != 9999)
    HouseEntered[plyid] = 9999;

    Spoiler anzeigen
    if(BizzEntered[plyid] != 9999)
    BizzEntered[plyid] = 9999;
    }

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen

    public LoadProperty()
    {
    new arrCoords[30][64];
    new strFromFile2[256];
    new File: file = fopen("/cfg/property.cfg", io_read);
    new string1[256];
    if (file)
    {
    new idx;
    while (idx < sizeof(HouseInfo))
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, ',');
    HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
    HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
    HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
    HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
    HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
    HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
    HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
    HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
    HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
    HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
    HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
    HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
    strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
    strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
    HouseInfo[idx][hValue] = strval(arrCoords[14]);
    HouseInfo[idx][hHel] = strval(arrCoords[15]);
    HouseInfo[idx][hArm] = strval(arrCoords[16]);
    HouseInfo[idx][hInt] = strval(arrCoords[17]);
    HouseInfo[idx][hLock] = strval(arrCoords[18]);
    HouseInfo[idx][hOwned] = strval(arrCoords[19]);
    HouseInfo[idx][hRooms] = strval(arrCoords[20]);
    HouseInfo[idx][hRent] = strval(arrCoords[21]);
    HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
    HouseInfo[idx][hTakings] = strval(arrCoords[23]);
    HouseInfo[idx][hVec] = strval(arrCoords[24]);
    if(HouseInfo[idx][hVec] == 457)
    {
    HouseInfo[idx][hVec] = 411;
    }
    HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
    HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
    HouseInfo[idx][hDate] = strval(arrCoords[27]);
    HouseInfo[idx][hLevel] = strval(arrCoords[28]);
    HouseInfo[idx][hVW] = strval(arrCoords[29]);
    printf("HouseInfo:%d Besitzer:%s hTakings: %d hVec: %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
    idx++;
    }
    new text[50];
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
    if(HouseInfo[h][hRentabil] == 1) { text="Ja"; }
    else if(HouseInfo[h][hRentabil] == 0) { text="Nein"; }
    if(HouseInfo[h][hOwned] == 0)
    {
    new LocationZone[MAX_ZONE_NAME];
    Get2DZone(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey],LocationZone,MAX_ZONE_NAME);
    format(string1, sizeof(string1), ""ZELENA"[HAUS]\n "TEXT"Preis: "ZELENA"%d€\n"TEXT"Beschreibung: "ZELENA"%s\n"TEXT"Level: "ZELENA"%d |"TEXT"| Adresse:"ZELENA" %s\n"TEXT"Kaufen: "ZELENA"/buyhaus",HouseInfo[h][hValue],HouseInfo[h][hDiscription],HouseInfo[h][hLevel],LocationZone);
    housesale[h] = Create3DTextLabel(string1,0x67B4B4FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,20,0,1);
    pickups++;
    }
    if(HouseInfo[h][hOwned] == 1)
    {
    new LocationZone[MAX_ZONE_NAME];
    Get2DZone(HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey],LocationZone,MAX_ZONE_NAME);
    format(string1, sizeof(string1), ""ZELENA"[HAUS]\n"BIJELA"Besitzer: "CRVENA"%s\n"BIJELA"Beschreibung: "CRVENA"%s\n"BIJELA"Mietbar: "CRVENA"%s\n"BIJELA"Adresse: "CRVENA"%s",HouseInfo[h][hOwner],HouseInfo[h][hDiscription],text,LocationZone);
    housesale[h] = Create3DTextLabel(string1,0xFFFFFFFF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+1,20,0,1);
    pickups++;
    }
    }
    fclose(file);
    }
    return 1;
    }

    Spoiler anzeigen
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
    if(HouseInfo[h][hOwned] == 0)
    {
    CreateDynamicPickup(1273, 0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
    pickups++;
    }
    if(HouseInfo[h][hOwned] == 1)
    {
    CreateDynamicPickup(1559, 0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
    pickups++;
    }
    }

    Spoiler anzeigen

    public DateProp(playerid)
    {
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    new curdate = getdate();
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
    if (strcmp(playername, HouseInfo[h][hOwner], true) == 0)
    {
    HouseInfo[h][hDate] = curdate;
    OnPropUpdate();
    }
    }
    return 1;
    }

    Spoiler anzeigen
    public Checkprop()
    {
    new olddate;
    new string[128];
    new curdate = getdate();
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
    if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hDate] > 9)
    {
    olddate = HouseInfo[h][hDate];
    if(curdate-olddate >= 5)
    {
    HouseInfo[h][hHel] = 0;
    HouseInfo[h][hArm] = 0;
    HouseInfo[h][hHealthx] = 0;
    HouseInfo[h][hHealthy] = 0;
    HouseInfo[h][hHealthz] = 0;
    HouseInfo[h][hArmourx] = 0;
    HouseInfo[h][hArmoury] = 0;
    HouseInfo[h][hArmourz] = 0;
    HouseInfo[h][hLock] = 1;
    HouseInfo[h][hOwned] = 0;
    HouseInfo[h][hVec] = 418;
    HouseInfo[h][hVcol1] = -1;
    HouseInfo[h][hVcol2] = -1;
    strmid(HouseInfo[h][hOwner], "Staat", 0, strlen("Staat"), 255);
    format(string, sizeof(string), "INFO: Ein Haus in Wert von %d€ ist verfügbar.",HouseInfo[h][hValue]);
    SendClientMessageToAll(COLOR_ZELENA, string);
    OnPropUpdate();
    }
    }
    }
    return 1;
    }

    Spoiler anzeigen

    public OnPropUpdate()
    {
    new idx;
    new File: file2;
    while (idx < sizeof(HouseInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
    HouseInfo[idx][hEntrancex],
    HouseInfo[idx][hEntrancey],
    HouseInfo[idx][hEntrancez],
    HouseInfo[idx][hExitx],
    HouseInfo[idx][hExity],
    HouseInfo[idx][hExitz],
    HouseInfo[idx][hHealthx],
    HouseInfo[idx][hHealthy],
    HouseInfo[idx][hHealthz],
    HouseInfo[idx][hArmourx],
    HouseInfo[idx][hArmoury],
    HouseInfo[idx][hArmourz],
    HouseInfo[idx][hOwner],
    HouseInfo[idx][hDiscription],
    HouseInfo[idx][hValue],
    HouseInfo[idx][hHel],
    HouseInfo[idx][hArm],
    HouseInfo[idx][hInt],
    HouseInfo[idx][hLock],
    HouseInfo[idx][hOwned],
    HouseInfo[idx][hRooms],
    HouseInfo[idx][hRent],
    HouseInfo[idx][hRentabil],
    HouseInfo[idx][hTakings],
    HouseInfo[idx][hVec],
    HouseInfo[idx][hVcol1],
    HouseInfo[idx][hVcol2],
    HouseInfo[idx][hDate],
    HouseInfo[idx][hLevel],
    HouseInfo[idx][hVW]);
    if(idx == 0)
    {
    file2 = fopen("/cfg/property.cfg", io_write);
    }
    else
    {
    file2 = fopen("/cfg/property.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(StanInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
    StanInfo[idx][sEntrancex],
    StanInfo[idx][sEntrancey],
    StanInfo[idx][sEntrancez],
    StanInfo[idx][sExitx],
    StanInfo[idx][sExity],
    StanInfo[idx][sExitz],
    StanInfo[idx][sOwner],
    StanInfo[idx][sDiscription],
    StanInfo[idx][sValue],
    StanInfo[idx][sInt],
    StanInfo[idx][sLock],
    StanInfo[idx][sOwned],
    StanInfo[idx][sRooms],
    StanInfo[idx][sRent],
    StanInfo[idx][sRentabil],
    StanInfo[idx][sTakings],
    StanInfo[idx][sDate],
    StanInfo[idx][sLevel],
    StanInfo[idx][sVWstan]);
    if(idx == 0)
    {
    file2 = fopen("/cfg/wohnungen.cfg", io_write);
    }
    else
    {
    file2 = fopen("/cfg/wohnungen.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(BizzInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
    BizzInfo[idx][bOwned],
    BizzInfo[idx][bOwner],
    BizzInfo[idx][bMessage],
    BizzInfo[idx][bExtortion],
    BizzInfo[idx][bEntranceX],
    BizzInfo[idx][bEntranceY],
    BizzInfo[idx][bEntranceZ],
    BizzInfo[idx][bExitX],
    BizzInfo[idx][bExitY],
    BizzInfo[idx][bExitZ],
    BizzInfo[idx][bLevelNeeded],
    BizzInfo[idx][bBuyPrice],
    BizzInfo[idx][bEntranceCost],
    BizzInfo[idx][bTill],
    BizzInfo[idx][bLocked],
    BizzInfo[idx][bInterior],
    BizzInfo[idx][bProducts],
    BizzInfo[idx][bMaxProducts],
    BizzInfo[idx][bPriceProd],
    BizzInfo[idx][bVWb]);
    if(idx == 0)
    {
    file2 = fopen("/cfg/firmen.cfg", io_write);
    }
    else
    {
    file2 = fopen("/cfg/firmen.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    idx = 0;
    while (idx < sizeof(SBizzInfo))
    {
    new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
    SBizzInfo[idx][sbOwned],
    SBizzInfo[idx][sbOwner],
    SBizzInfo[idx][sbMessage],
    SBizzInfo[idx][sbExtortion],
    SBizzInfo[idx][sbEntranceX],
    SBizzInfo[idx][sbEntranceY],
    SBizzInfo[idx][sbEntranceZ],
    SBizzInfo[idx][sbLevelNeeded],
    SBizzInfo[idx][sbBuyPrice],
    SBizzInfo[idx][sbEntranceCost],
    SBizzInfo[idx][sbTill],
    SBizzInfo[idx][sbLocked],
    SBizzInfo[idx][sbInterior],
    SBizzInfo[idx][sbProducts],
    SBizzInfo[idx][sbMaxProducts],
    SBizzInfo[idx][sbPriceProd]);
    if(idx == 0)
    {
    file2 = fopen("/cfg/firmen2.cfg", io_write);
    }
    else
    {
    file2 = fopen("/cfg/firmen2.cfg", io_append);
    }
    fwrite(file2, coordsstring);
    idx++;
    fclose(file2);
    }
    return 1;
    }

    Spoiler anzeigen
    if(strcmp(cmd, "/open", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new i = 0; i < sizeof(HouseInfo); i++)
    {
    if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
    {
    if(PlayerInfo[playerid][pPhousekey] == i)
    {
    if(HouseInfo[i][hLock] == 1)
    {
    HouseInfo[i][hLock] = 0;
    GameTextForPlayer(playerid, "~w~Tuer ~g~aufgeschlossen", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    if(HouseInfo[i][hLock] == 0)
    {
    HouseInfo[i][hLock] = 1;
    GameTextForPlayer(playerid, "~w~Tuer ~r~geschlossen", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Du hast keine Schluessel", 5000, 6);
    return 1;
    }
    }
    }
    for(new i = 0; i < sizeof(StanInfo); i++)
    {
    if (PlayerToPoint(3, playerid,StanInfo[i][sEntrancex], StanInfo[i][sEntrancey], StanInfo[i][sEntrancez]) || PlayerToPoint(3, playerid,StanInfo[i][sExitx], StanInfo[i][sExity], StanInfo[i][sExitz]))
    {
    if(PlayerInfo[playerid][pWohnung] == i)
    {
    if(StanInfo[i][sLock] == 1)
    {
    StanInfo[i][sLock] = 0;
    GameTextForPlayer(playerid, "~w~Tuer ~g~aufgeschlossen", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    if(StanInfo[i][sLock] == 0)
    {
    StanInfo[i][sLock] = 1;
    GameTextForPlayer(playerid, "~w~Tuer ~r~geschlossen", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Du hast keine Schluessel", 5000, 6);
    return 1;
    }
    }
    }
    for(new i = 0; i < sizeof(BizzInfo); i++)
    {
    if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
    {
    if(PlayerInfo[playerid][pPbiskey] == i)
    {
    if(BizzInfo[i][bLocked] == 1)
    {
    BizzInfo[i][bLocked] = 0;
    GameTextForPlayer(playerid, "~w~Firma ~g~geoeffnet", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    if(BizzInfo[i][bLocked] == 0)
    {
    BizzInfo[i][bLocked] = 1;
    GameTextForPlayer(playerid, "~w~Firma ~r~geschlossen", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Du hast keine Schluessel", 5000, 6);
    return 1;
    }
    }
    }
    for(new i = 0; i < sizeof(SBizzInfo); i++)
    {
    if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
    {
    if(PlayerInfo[playerid][pPbiskey] == i+100)
    {
    if(SBizzInfo[i][sbLocked] == 1)
    {
    SBizzInfo[i][sbLocked] = 0;
    GameTextForPlayer(playerid, "~w~Firma ~g~geoeffnet", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    if(SBizzInfo[i][sbLocked] == 0)
    {
    SBizzInfo[i][sbLocked] = 1;
    GameTextForPlayer(playerid, "~w~Firma ~r~geschlossen", 5000, 4);
    PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
    return 1;
    }
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Du hast keine Schluessel", 5000, 6);
    return 1;
    }
    }
    }
    }
    return 1;
    }

    Spoiler anzeigen
    if(strcmp(cmd, "/rentroom", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    GetPlayerName(playerid, playername, sizeof(playername));
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    for(new h = 0; h < sizeof(HouseInfo); h++)
    {
    if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 1 && HouseInfo[h][hRentabil] == 1)
    {
    if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
    {
    SendClientMessage(playerid, COLOR_CRVENA, "[ERROR]:Du hast bereits ein Haus, verwende /sellhouse um es zu verkaufen!.");
    return 1;
    }
    if (PlayerInfo[playerid][pPerso] < 1)
    {
    SendClientMessage(playerid,COLOR_INFO,"Du hast keinen Personalausweis, du kannst ihn dir in der Stadthalle holen.");
    return 1;
    }
    if(GetPlayerCash(playerid) > HouseInfo[h][hRent])
    {
    PlayerInfo[playerid][pPhousekey] = h;
    GivePlayerCash(playerid,-HouseInfo[h][hRent]);
    HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
    PlayerPlayMusic(playerid);
    SetPlayerInterior(playerid,HouseInfo[h][hInt]);
    SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
    GameTextForPlayer(playerid, "~w~Willkommen zuhause~n~Du kannst das Haus mit /exit verlassen", 5000, 3);
    PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
    PlayerInfo[playerid][pLocal] = h;
    SendClientMessage(playerid, COLOR_WHITE, "Herzlichen Glückwunsch !");
    SendClientMessage(playerid, COLOR_WHITE, "Verwende /houseinfo um zu sehen welche Befehle verfügbar sind!");
    OnPlayerUpdate(playerid);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_CRVENA, "[ERROR]:Du hast nicht genug Geld");
    return 1;
    }
    }
    }
    }
    return 1;
    }
    // stan
    if(strcmp(cmd, "/einmieten", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new Float:oldposx, Float:oldposy, Float:oldposz;
    GetPlayerName(playerid, playername, sizeof(playername));
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    for(new h = 0; h < sizeof(StanInfo); h++)
    {
    if(PlayerToPoint(2.0, playerid, StanInfo[h][sEntrancex], StanInfo[h][sEntrancey], StanInfo[h][sEntrancez]) && StanInfo[h][sOwned] == 1 && StanInfo[h][sRentabil] == 1)
    {
    if(PlayerInfo[playerid][pWohnung] != 255 && strcmp(playername, StanInfo[PlayerInfo[playerid][pWohnung]][sOwner], true) == 0)
    {
    SendClientMessage(playerid, COLOR_CRVENA, "[ERROR]:Du hast bereits eine Wohnung, also kannst du diese nicht mieten.");
    return 1;
    }
    if (PlayerInfo[playerid][pPerso] < 1)
    {
    SendClientMessage(playerid,COLOR_INFO,"Du hast keinen Personalausweis, du kannst ihn dir in der Stadthalle holen.");
    return 1;
    }
    if(GetPlayerCash(playerid) > StanInfo[h][sRent])
    {
    PlayerInfo[playerid][pWohnung] = h;
    GivePlayerCash(playerid,-StanInfo[h][sRent]);
    StanInfo[h][sTakings] = StanInfo[h][sTakings]+StanInfo[h][sRent];
    PlayerPlayMusic(playerid);
    SetPlayerInterior(playerid,StanInfo[h][sInt]);
    SetPlayerPos(playerid,StanInfo[h][sExitx],StanInfo[h][sExity],StanInfo[h][sExitz]);
    GameTextForPlayer(playerid, "~w~Willkommen zuhause~n~Du kannst die Wohnung mit /exit verlassen", 5000, 3);
    PlayerInfo[playerid][pInt] = StanInfo[h][sInt];
    PlayerInfo[playerid][pLocal] = h;
    SendClientMessage(playerid, COLOR_WHITE, "Du mietest nun eine Wohnung!");
    OnPlayerUpdate(playerid);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_CRVENA, "[ERROR]:Du hast nicht genug Geld");
    return 1;
    }
    }
    }
    }
    return 1;
    }