Addhouse Proplem ( Speicher die Xyz Daten vom 0 Punkt ) statt die wo man steht

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 alle zusammen bei meinem neuen haus system ist ein großer fehler wenn man ein haus erstellt ingame
    speicht er die Xyz Daten vom NULL PUNKT statt da wo man steht Why ?


    Bitte Helfen


    COMMAND:done(playerid, params[])
    {
    if(CreateHouse[playerid][chInt] != -1)
    {
    new string[300];
    new int = CreateHouse[playerid][chInt];
    new i = GetIntGHS(int);
    new houses = OWNABLEHOUSES;
    OWNABLEHOUSES ++;


    CreateHouse[playerid][chInt] = IntInfo[int][iInterior];
    CreateHouse[playerid][chCost] = IntInfo[int][iCost];
    CreateHouse[playerid][chLevel] = IntInfo[int][iLevel];
    CreateHouse[playerid][chExit_X] = GHSPos[i][0];
    CreateHouse[playerid][chExit_Y] = GHSPos[i][1];
    CreateHouse[playerid][chExit_Z] = GHSPos[i][2];


    HouseInfo[houses][hExit_X] = CreateHouse[playerid][chExit_X];
    HouseInfo[houses][hExit_Y] = CreateHouse[playerid][chExit_Y];
    HouseInfo[houses][hExit_Z] = CreateHouse[playerid][chExit_Z];
    HouseInfo[houses][hEnter_X] = CreateHouse[playerid][chEnter_X];
    HouseInfo[houses][hEnter_Y] = CreateHouse[playerid][chEnter_Y];
    HouseInfo[houses][hEnter_Z] = CreateHouse[playerid][chEnter_Z];
    HouseInfo[houses][hInt] = CreateHouse[playerid][chInt];
    HouseInfo[houses][hCost] = CreateHouse[playerid][chCost];
    HouseInfo[houses][hLevel] = CreateHouse[playerid][chLevel];


    HouseIcon[houses] = CreateDynamicMapIcon(HouseInfo[houses][hEnter_X], HouseInfo[houses][hEnter_Y], HouseInfo[houses][hEnter_Z], 31, 0);
    HouseCP[houses] = CreateDynamicCP(HouseInfo[houses][hEnter_X], HouseInfo[houses][hEnter_Y], HouseInfo[houses][hEnter_Z], 1.0, -1, -1, -1, 10.0);
    House3DText[houses] = CreateDynamic3DTextLabel("*** Haus ***",0xE1AE3CFF,HouseInfo[houses][hEnter_X], HouseInfo[houses][hEnter_Y],HouseInfo[houses][hEnter_Z],20.0);
    UpdateHouse(houses, false);


    format(string, sizeof(string), "INSERT INTO `Houses` (`Enter_X`, `Enter_Y`, `Enter_Z`, `Exit_X`, `Exit_Y`, `Exit_Z`, `Level`, `Interior`, `Cost`) VALUE ('%.4f', '%.4f', '%.4f', '%.4f', '%.4f', '%.4f', '%d', '%d', '%d')",
    CreateHouse[playerid][chEnter_X],
    CreateHouse[playerid][chEnter_Y],
    CreateHouse[playerid][chEnter_Z],
    CreateHouse[playerid][chExit_X],
    CreateHouse[playerid][chExit_Y],
    CreateHouse[playerid][chExit_Z],
    CreateHouse[playerid][chLevel],
    CreateHouse[playerid][chInt],
    CreateHouse[playerid][chCost]);
    mysql_query(string);


    format(string, sizeof(string), "\
    {FFFFFF}Position: {AFAFAF}%.4f, %.4f, %.4f\n\
    {FFFFFF}Die Position: {AFAFAF}%.4f, %.4f, %.4f\n\
    {FFFFFF}Level: {AFAFAF}%d\n\
    {FFFFFF}Innenraum: {AFAFAF}%d\n\
    {FFFFFF}Wert: {AFAFAF}%d",
    CreateHouse[playerid][chEnter_X],
    CreateHouse[playerid][chEnter_Y],
    CreateHouse[playerid][chEnter_Z],
    CreateHouse[playerid][chExit_X],
    CreateHouse[playerid][chExit_Y],
    CreateHouse[playerid][chExit_Z],
    CreateHouse[playerid][chLevel],
    CreateHouse[playerid][chInt],
    CreateHouse[playerid][chCost]);
    ShowPlayerDialogEx(playerid, INVALID_DIALOG_ID, 0, "Du hast erfolgreich ein Haus erstllt!", string, "Ok", "");
    PlayerPlaySound(playerid, 30800, 0.0, 0.0, 0.0);
    J_TogglePlayerSpectating(playerid, false);
    PlayerTextDrawHide(playerid,InfoText[playerid]);
    SetTimerEx("ChangePlayerPos", 1000, false, "ifff", playerid, CreateHouse[playerid][chEnter_X], CreateHouse[playerid][chEnter_Y], CreateHouse[playerid][chEnter_Z]);
    CreateHouse[playerid][chInt] = -1;



    Ist ein Include

  • sry falschen code geschickt ...


    COMMAND:addhouse(playerid, params[])
    {
    if(PlayerInfo[playerid][pAdmin] >= ADM_ADMIN)
    {
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    CreateHouse[playerid][chEnter_X] = X;
    CreateHouse[playerid][chEnter_Y] = Y;
    CreateHouse[playerid][chEnter_Z] = Z;
    CreateHouse[playerid][chInt] = 1;
    J_TogglePlayerSpectating(playerid,true);
    SendClientMessage(playerid, 0xFFFFFFFF, "Warte ein wenig ...");
    SetTimerEx("ChangeInterior", 1000, false, "i", playerid);
    }
    return true;
    }


    das ist er beim erstellen

  • CreateHouse[playerid][chEnter_X],
    CreateHouse[playerid][chEnter_Y],
    CreateHouse[playerid][chEnter_Z],
    CreateHouse[playerid][chExit_X],
    CreateHouse[playerid][chExit_Y],
    CreateHouse[playerid][chExit_Z],
    CreateHouse[playerid][chLevel],
    CreateHouse[playerid][chInt],
    CreateHouse[playerid][chCost]);
    ShowPlayerDialogEx(playerid, INVALID_DIALOG_ID, 0, "Du hast erfolgreich ein Haus erstllt!", string, "Ok", "");
    PlayerPlaySound(playerid, 30800, 0.0, 0.0, 0.0);
    J_TogglePlayerSpectating(playerid, false);
    PlayerTextDrawHide(playerid,InfoText[playerid]);
    SetTimerEx("ChangePlayerPos", 1000, false, "ifff", playerid, CreateHouse[playerid][chEnter_X], CreateHouse[playerid][chEnter_Y], CreateHouse[playerid][chEnter_Z]);
    CreateHouse[playerid][chInt] = -1;