/enter Bug

In 10 Minuten startet der nächtliche Backupvorgang! Es kann währenddessen (ca. 10 Minuten) zu Einschränkungen bei der Nutzung des Forums kommen
Weitere Infos findet ihr im Thema Backup des Forums
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
  • Habe ein Problem mit /enter
    Wenn ich /enter mache und in ein Haus oder Biz gehe muss ich meistens 5-7 mal /enter machen damit ich drin bleibe.
    Wenn ich 1 mal /enter mache bin ich für eine halbe sekunde drin und werden dann wieder aus dem Haus/Biz geworfen



    if(strcmp(cmd, "/enter", 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]))
    {
    //printf("Found House :%d",i);
    if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
    {
    SetPlayerInterior(playerid,HouseInfo[i][hInt]);
    SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
    GameTextForPlayer(playerid, "~w~Willkommen Home", 5000, 1);
    PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
    PlayerInfo[playerid][pLocal] = i;
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Abgeschlossen", 5000, 1);
    }
    }
    }
    for(new i = 0; i < sizeof(BizzInfo); i++)
    {
    if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
    {
    //printf("Found House :%d",i);
    /*if(!IsACop(playerid) && i == 2)
    {
    SendClientMessage(playerid, COLOR_GREY, " Cops only !");
    return 1;
    }
    */
    if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
    {
    if(PlayerInfo[playerid][pPbiskey] != i)
    {
    if(BizzInfo[i][bLocked] == 1)
    {
    GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
    return 1;
    }
    if(BizzInfo[i][bProducts] == 0)
    {
    GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
    return 1;
    }
    PlayerMoney[playerid] -= BizzInfo[i][bEntranceCost];
    format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
    BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
    ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
    BizzInfo[i][bProducts]--;
    OnPropUpdate();
    GameTextForPlayer(playerid, string, 5000, 3);
    }
    SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
    SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
    PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
    PlayerInfo[playerid][pLocal] = i+99;
    new dood[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dood, sizeof(dood));
    format(string, sizeof(string), "%s payed $%d to enter biz %d", dood, BizzInfo[i][bEntranceCost], i);
    printf("%s", string);
    PayLog(string);
    }
    else
    {
    GameTextForPlayer(playerid, "~r~You dont have the cash", 5000, 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 || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
    {
    if(PlayerInfo[playerid][pPbiskey] != i)
    {
    if(SBizzInfo[i][sbLocked] == 1)
    {
    GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
    return 1;
    }
    if(SBizzInfo[i][sbProducts] == 0)
    {
    GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
    return 1;
    }
    if(i == 10)
    {
    PaintballPlayers ++;
    PlayerPaintballing[playerid] = 1;
    new rand = random(sizeof(PaintballSpawns));
    SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
    TogglePlayerControllable(playerid, 0);
    }
    else if(i == 11)
    {
    PlayerKarting[playerid] = 1;
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "You can now parcipitate in a Karting Race, grab a Kart.");
    }
    else
    {
    return 1;
    }
    PlayerMoney[playerid] -= SBizzInfo[i][sbEntranceCost];
    gSpentCash[playerid] = GetPlayerMoney(playerid);
    SBizzInfo[i][sbProducts]--;
    SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
    ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
    new dood[MAX_PLAYER_NAME];
    GetPlayerName(playerid, dood, sizeof(dood));
    format(string, sizeof(string), "%s bezahlte $%d um das Geschäft zubetreten ID:%d", dood, SBizzInfo[i][sbEntranceCost], i);
    printf("%s", string);
    PayLog(string);
    OnPropUpdate();
    }
    }
    else
    {
    GameTextForPlayer(playerid, "~r~Du hast nicht das Geld dazu", 5000, 1);
    }
    }
    }
    if (PlayerToPoint(3.0, playerid,1251.4420,-1664.5453,12.6719))
    {
    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
    {
    SetPlayerInterior(playerid,2);
    SetPlayerPos(playerid,1205.0947,-10.1685,1000.9219);
    PlayerInfo[playerid][pInt] = 2;
    PlayerInfo[playerid][pLocal] = 242;
    }
    }
    else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
    {
    GameTextForPlayer(playerid, "~w~Willkommen to the 8ball Track", 5000, 1);
    SetPlayerInterior(playerid,7);
    SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
    }
    else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
    {
    GameTextForPlayer(playerid, "~w~Willkommen to the Dirt Track", 5000, 1);
    SetPlayerInterior(playerid,4);
    SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
    }
    else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
    {
    GameTextForPlayer(playerid, "~w~Willkommen to the Stunting Track", 5000, 1);
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
    }
    if (PlayerToPoint(1.5, playerid,-77.3365,-1136.5358,1.0781)) //Trucker
    {
    GameTextForPlayer(playerid, "~w~Gebe ~r~/starttour~w~ als Trucker ein, ~n~ um deine Tour zu starten.", 5000, 3);
    }
    /* else if (PlayerToPoint(3.0, playerid,-1341.375610,496.082794,11.195300))
    {
    if(!IsACop(playerid))
    {
    SendClientMessage(playerid, COLOR_GREY, " Cops only !");
    return 1;
    }
    }
    else if (PlayerToPoint(3.0, playerid,-1341.375610,496.082794,11.195300))
    {
    GameTextForPlayer(playerid, "~w~Willkommen to the Stunting Track", 5000, 1);
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
    }*/
    }
    return 1;
    }







    Ich habe keine Ahnung woran das liegt.
    Bitte Helft mir


    Danke

    Bereit jemand über Paypal oder Sonstiges zu bezahlen wenn er mir bei den Probleme hilft!

  • Hier nocheinmal /exit


    if(strcmp(cmd, "/exit", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new i = 0; i < sizeof(HouseInfo); i++)
    {
    if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
    {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pLocal] = 255;
    SetPlayerVirtualWorld(playerid, 0);
    if(HouseInfo[i][hHel] == 1)
    {
    new Float:tempheal;
    GetPlayerHealth(playerid,tempheal);
    if(tempheal < 100.0)
    {
    SetPlayerHealth(playerid,100.0);
    }
    }
    }
    }
    for(new i = 0; i < sizeof(BizzInfo); i++)
    {
    if (PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
    {
    SetPlayerInterior(playerid,0);
    PlayerInfo[playerid][pInt] = 0;
    SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
    PlayerInfo[playerid][pLocal] = 255;
    SetPlayerVirtualWorld(playerid,0);
    }
    }
    if(PlayerExitAble[playerid] == 1)
    {
    PlayerRentCar[playerid] = 0;
    PlayerExitAble[playerid] = 0;
    PlayerRemove[playerid] = 1;
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    /* }
    else if (PlayerToPoint(3.0, playerid,387.7978,173.8582,1008.3828))
    {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,1481.1975,-1764.7368,18.7958);
    PlayerInfo[playerid][pInt] = 0;
    PlayerInfo[playerid][pLocal] = 255;*/
    }
    if(AWegFahrSperre[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "* Fahrzeug verlassen");
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    AWegFahrSperre[playerid] = 0;
    }
    if(AdminWegfahrSperre[playerid] == 1)
    {
    SendClientMessage(playerid, COLOR_YELLOW, "* Fahrzeug verlassen");
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    AWegFahrSperre[playerid] = 0;
    }
    else if (PlayerToPoint(6.0, playerid,-1404.5299,-259.0602,1043.6563))
    {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,2695.6235,-1704.6960,11.8438);
    }
    else if (PlayerToPoint(8.0, playerid,-1443.0554,-581.1879,1055.0472))
    {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-2111.5686,-443.9720,38.7344);
    }
    else if (PlayerToPoint(8.0, playerid,-1464.7732,1557.5533,1052.5313))
    {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-2080.3079,-406.0309,38.7344);
    }
    else if (PlayerToPoint(3.0, playerid,2521.1396,-1281.3595,1054.6406))//Ausgang
    {
    SetPlayerInterior(playerid,0);
    SetPlayerPos(playerid,-2136.5632,-248.2044,36.4519);
    }
    else if(NoFuel[playerid] == 1)
    {
    TogglePlayerControllable(playerid, 1);
    RemovePlayerFromVehicle(playerid);
    NoFuel[playerid] = 0;
    }
    }
    return 1;
    }

    Bereit jemand über Paypal oder Sonstiges zu bezahlen wenn er mir bei den Probleme hilft!

  • wieso benutzt du playertopoint antstatt isplayerinrangeoffpoint?