Problem mit meinem Haussystem

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
  • Das heißt also, in der Datenbank bei "spawnpunkt" steht eine 1?
    Dann poste mal bitte dein ganzen "Ladecode".

  • public OnHausesLoad()
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields);
    if(!num_rows)return 1;
    //for(new i = 0; i < MAX_HOUSES; i++)
    for(new i = 0; i < num_rows; i++)
    {
    new id = getFreeHausID();
    new string[24];
    hInfo[id][h_x] = cache_get_field_content_float(i, "h_x", dbhandle);
    hInfo[id][h_y] = cache_get_field_content_float(i, "h_y", dbhandle);
    hInfo[id][h_z] = cache_get_field_content_float(i, "h_z", dbhandle);
    if(hInfo[id][h_x] == 0 && hInfo[id][h_y] == 0 && hInfo[id][h_z] == 0)continue;
    hInfo[id][ih_x] = cache_get_field_content_float(i, "ih_x", dbhandle);
    hInfo[id][ih_y] = cache_get_field_content_float(i, "ih_y", dbhandle);
    hInfo[id][ih_z] = cache_get_field_content_float(i, "ih_z", dbhandle);
    hInfo[id][h_interior] = cache_get_field_content_int(i, "h_interior", dbhandle);


    cache_get_field_content(i, "besitzer", string);
    format(hInfo[id][h_besitzer], sizeof(string), string);


    hInfo[id][h_id] = cache_get_field_content_int(i, "id", dbhandle);
    hInfo[id][h_preis] = cache_get_field_content_int(i, "h_preis", dbhandle);
    hInfo[id][h_mietpreis] = cache_get_field_content_int(i, "h_mietpreis", dbhandle);
    hInfo[id][h_maxmieter] = cache_get_field_content_int(i, "h_maxmieter", dbhandle);
    new printstring[90];
    format(printstring,sizeof(printstring),"i = %d - id = %d - MySQLID: %d - Besitzer: %s", i, id, hInfo[id][h_id],hInfo[id][h_besitzer]);
    print(printstring);
    CreatePickup(19523,1,hInfo[id][ih_x],hInfo[id][ih_y],hInfo[id][ih_z],id);
    }


    print("Zweite Schleife:");


    new highid = getFreeHausID();
    for(new i = 0; i < highid; i++)
    {
    updateHaus(i);
    }
    return 1;
    }


    Mit freundlichen Grüßen
    German_ScripterHD

  • public OnPasswordResponse(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==1)
    {
    new money_string[128];
    //Passwort richtig //Spieler laden
    SetSpawnInfo(playerid,0,sInfo[playerid][skin],439.3006,-1752.2723,8.7708,221.4513,0,0,0,0,0,0);
    SpawnPlayer(playerid);
    SendClientMessage(playerid,C_Blau,"Erfolgreich eingeloggt.");
    sInfo[playerid][eingeloggt] = 1;
    sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
    SetPlayerScore(playerid,sInfo[playerid][level]);
    sInfo[playerid][db_id] = cache_get_field_content_int(0,"id",dbhandle);
    sInfo[playerid][geld] = cache_get_field_content_int(0,"money",dbhandle);
    sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
    sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
    sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
    sInfo[playerid][bank] = cache_get_field_content_int(0,"bank",dbhandle);
    sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
    sInfo[playerid][prison] = cache_get_field_content_int(0,"prison",dbhandle);
    sInfo[playerid][Donator] = cache_get_field_content_int(0,"Donator",dbhandle);
    sInfo[playerid][CarLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][BikeLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][FlugLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][LkwLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][BootLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][skin] = cache_get_field_content_int(0,"skin",dbhandle);
    sInfo[playerid][vehicles] = cache_get_field_content_int(0,"vehicles",dbhandle);
    sInfo[playerid][payday] = cache_get_field_content_int(0,"payday",dbhandle);
    sInfo[playerid][donats] = cache_get_field_content_int(0,"donats",dbhandle);
    sInfo[playerid][radio] = cache_get_field_content_int(0,"radio",dbhandle);
    sInfo[playerid][navi] = cache_get_field_content_int(0,"navi",dbhandle);
    sInfo[playerid][respekt] = cache_get_field_content_int(0,"respekt",dbhandle);
    sInfo[playerid][job] = cache_get_field_content_int(0,"job",dbhandle);
    sInfo[playerid][wanted] = cache_get_field_content_int(0,"wanted",dbhandle);
    sInfo[playerid][handynummer] = cache_get_field_content_int(0,"handynummer",dbhandle);
    sInfo[playerid][spawnpunkt] = cache_get_field_content_int(0,"spawnpunkt",dbhandle);
    cache_get_field_content(0,"username",sInfo[playerid][username],dbhandle,32);
    sInfo[playerid][fightstyle] = cache_get_field_content_int(0,"fightstyle",dbhandle);
    SetPlayerFightingStyle(playerid,sInfo[playerid][fightstyle]);
    SetPlayerSkin(playerid,sInfo[playerid][skin]);


    Mit freundlichen Grüßen
    German_ScripterHD

  • sInfo[playerid][spawnpunkt] = cache_get_field_content_int(0,"spawnpunkt",dbhandle);
    zu:
    sInfo[playerid][spawnpunkt] = cache_get_field_content_int(0,"spawnpunkt",dbhandle);
    printf("spawnpunkt nach dem laden: %d",sInfo[playerid][spawnpunkt]);


    Falls da 111 rauskommt, kannst du dann bitte einen Screenshot deiner Tabelle machen, wo man sieht welchen Wert "spawnpunkt" bei deinem Account, den du verwendest, hat?

  • Jetzt verzweifele ich immer mehr ...?(


    Der print hat das ergeben:

    [02:16:21] spawnpunkt nach dem laden: 1


    Aber das kommt wieder bei spawn:


    [02:16:21] hInfo[i][h_id] == 1
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 3
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 5
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 7
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 8
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 9
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 10
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 11
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 12
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 13
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 14
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 15
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 16
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 19
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 20
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 21
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 22
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 23
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 24
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 25
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    [02:16:21] hInfo[i][h_id] == 0
    [02:16:21] sInfo[playerid][spawnpunkt] == 111
    //....


    Mit freundlichen Grüßen
    German_ScripterHD

  • public OnPasswordResponse(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==1)
    {
    new money_string[128];
    //Passwort richtig //Spieler laden
    SendClientMessage(playerid,C_Blau,"Erfolgreich eingeloggt.");
    sInfo[playerid][eingeloggt] = 1;
    sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
    SetPlayerScore(playerid,sInfo[playerid][level]);
    sInfo[playerid][db_id] = cache_get_field_content_int(0,"id",dbhandle);
    sInfo[playerid][geld] = cache_get_field_content_int(0,"money",dbhandle);
    sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
    sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
    sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
    sInfo[playerid][bank] = cache_get_field_content_int(0,"bank",dbhandle);
    sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
    sInfo[playerid][prison] = cache_get_field_content_int(0,"prison",dbhandle);
    sInfo[playerid][Donator] = cache_get_field_content_int(0,"Donator",dbhandle);
    sInfo[playerid][CarLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][BikeLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][FlugLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][LkwLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][BootLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][skin] = cache_get_field_content_int(0,"skin",dbhandle);
    sInfo[playerid][vehicles] = cache_get_field_content_int(0,"vehicles",dbhandle);
    sInfo[playerid][payday] = cache_get_field_content_int(0,"payday",dbhandle);
    sInfo[playerid][donats] = cache_get_field_content_int(0,"donats",dbhandle);
    sInfo[playerid][radio] = cache_get_field_content_int(0,"radio",dbhandle);
    sInfo[playerid][navi] = cache_get_field_content_int(0,"navi",dbhandle);
    sInfo[playerid][respekt] = cache_get_field_content_int(0,"respekt",dbhandle);
    sInfo[playerid][job] = cache_get_field_content_int(0,"job",dbhandle);
    sInfo[playerid][wanted] = cache_get_field_content_int(0,"wanted",dbhandle);
    sInfo[playerid][handynummer] = cache_get_field_content_int(0,"handynummer",dbhandle);
    sInfo[playerid][spawnpunkt] = cache_get_field_content_int(0,"spawnpunkt",dbhandle);
    cache_get_field_content(0,"username",sInfo[playerid][username],dbhandle,32);
    sInfo[playerid][fightstyle] = cache_get_field_content_int(0,"fightstyle",dbhandle);
    SetPlayerFightingStyle(playerid,sInfo[playerid][fightstyle]);
    SetPlayerSkin(playerid,sInfo[playerid][skin]);
    SetSpawnInfo(playerid,0,sInfo[playerid][skin],439.3006,-1752.2723,8.7708,221.4513,0,0,0,0,0,0);
    SpawnPlayer(playerid);


    Scheiße, zu spät für die Fehler. :P
    SpawnPlayer(playerid); muss natürlich nach dem laden kommen. ^^

  • Beitrag von German_ScripterHD ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.
  • Also...


    Ich habe es jetzt so: (geht aber leider immernoch nicht)


    Spoiler anzeigen
    public OnPasswordResponse(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==1)
    {
    new money_string[128];
    //Passwort richtig //Spieler laden
    SendClientMessage(playerid,C_Blau,"Erfolgreich eingeloggt.");
    sInfo[playerid][eingeloggt] = 1;
    sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
    SetPlayerScore(playerid,sInfo[playerid][level]);
    sInfo[playerid][db_id] = cache_get_field_content_int(0,"id",dbhandle);
    sInfo[playerid][geld] = cache_get_field_content_int(0,"money",dbhandle);
    sInfo[playerid][alevel] = cache_get_field_content_int(0,"alevel",dbhandle);
    sInfo[playerid][fraktion] = cache_get_field_content_int(0,"fraktion",dbhandle);
    sInfo[playerid][rang] = cache_get_field_content_int(0,"rang",dbhandle);
    sInfo[playerid][bank] = cache_get_field_content_int(0,"bank",dbhandle);
    sInfo[playerid][spawnchange] = cache_get_field_content_int(0,"spawnchange",dbhandle);
    sInfo[playerid][prison] = cache_get_field_content_int(0,"prison",dbhandle);
    sInfo[playerid][Donator] = cache_get_field_content_int(0,"Donator",dbhandle);
    sInfo[playerid][CarLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][BikeLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][FlugLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][LkwLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][BootLic] = cache_get_field_content_int(0,"CarLic",dbhandle);
    sInfo[playerid][skin] = cache_get_field_content_int(0,"skin",dbhandle);
    sInfo[playerid][vehicles] = cache_get_field_content_int(0,"vehicles",dbhandle);
    sInfo[playerid][payday] = cache_get_field_content_int(0,"payday",dbhandle);
    sInfo[playerid][donats] = cache_get_field_content_int(0,"donats",dbhandle);
    sInfo[playerid][radio] = cache_get_field_content_int(0,"radio",dbhandle);
    sInfo[playerid][navi] = cache_get_field_content_int(0,"navi",dbhandle);
    sInfo[playerid][respekt] = cache_get_field_content_int(0,"respekt",dbhandle);
    sInfo[playerid][job] = cache_get_field_content_int(0,"job",dbhandle);
    sInfo[playerid][wanted] = cache_get_field_content_int(0,"wanted",dbhandle);
    sInfo[playerid][handynummer] = cache_get_field_content_int(0,"handynummer",dbhandle);
    sInfo[playerid][spawnpunkt] = cache_get_field_content_int(0,"spawnpunkt",dbhandle);
    printf("spawnpunkt nach dem laden: %d",sInfo[playerid][spawnpunkt]);
    cache_get_field_content(0,"username",sInfo[playerid][username],dbhandle,32);
    sInfo[playerid][fightstyle] = cache_get_field_content_int(0,"fightstyle",dbhandle);
    SetPlayerFightingStyle(playerid,sInfo[playerid][fightstyle]);
    SetPlayerSkin(playerid,sInfo[playerid][skin]);
    SetSpawnInfo(playerid,0,sInfo[playerid][skin],439.3006,-1752.2723,8.7708,221.4513,0,0,0,0,0,0);
    SpawnPlayer(playerid);


    Jetzt habe ich mal in der Datenbank nicht "1" sondern "20" eingetragen, aber es kommt dieser ServerLog dabei raus:

    Spoiler anzeigen

    [12:43:58] spawnpunkt nach dem laden: 20
    //_________________________________//
    [12:43:58] hInfo[i][h_id] == 1
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 3
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 5
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 7
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 8
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 9
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 10
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 11
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 12
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 13
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 14
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 15
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 16
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 19
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 20
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 21
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 22
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 23
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 24
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 25
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 0
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 0
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 0
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    [12:43:58] hInfo[i][h_id] == 0
    [12:43:58] sInfo[playerid][spawnpunkt] == 111
    //......


    Ich hoffe ihr könnt mir helfen :)


    //Edit:
    Habe das noch eingefügt vor der for Schleife:
    printf("[OnPlayerSpawn]-[Vor (for-Schleife)] sInfo[playerid][spawnpunkt] == %i",sInfo[playerid][spawnpunkt]);
    [12:57:08] [OnPlayerSpawn]-[Vor (for-Schleife)] sInfo[playerid][spawnpunkt] == 111
    MfG :thumbup:


    Mit freundlichen Grüßen
    German_ScripterHD

    2 Mal editiert, zuletzt von German_ScripterHD ()

  • Entweder bin ich zu blöd, und sehe den Fehler nicht, oder du lässt spawnpunkt irgendwo in deinem Script erneut setzen.
    Such mal in deinem Script nach sInfo[playerid][spawnpunkt], vielleicht findest du ja was.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • sInfo[playerid][spawnpunkt]


    Also hier kommt das alles vor:


    Spieler landen:

    sInfo[playerid][spawnpunkt] = cache_get_field_content_int(0,"spawnpunkt",dbhandle);
    printf("spawnpunkt nach dem laden: %d",sInfo[playerid][spawnpunkt]);


    Und bei OnPlayerSpawn:


    printf("[OnPlayerSpawn]-[Vor Schleife] sInfo[playerid][spawnpunkt] == %d",sInfo[playerid][spawnpunkt]);
    if(sInfo[playerid][spawnpunkt] > 0)
    {
    for(new i=0; i<sizeof(hInfo); i++)
    {
    printf("hInfo[i][h_id] == %d",hInfo[i][h_id]);
    printf("sInfo[playerid][spawnpunkt] == %d",sInfo[playerid][spawnpunkt]);
    if(hInfo[i][h_id]==20)
    {
    if(!hInfo[i][h_id])continue;
    if(!strlen(hInfo[i][h_besitzer]))continue;
    if(strcmp(hInfo[i][h_besitzer], getPlayerName(playerid), true))continue;
    if(hInfo[i][ih_x] != 0.0)
    {
    //Im Haus spawnen
    SetPlayerPos(playerid, hInfo[i][ih_x], hInfo[i][ih_y], hInfo[i][ih_z]);
    SetPlayerInterior(playerid, hInfo[i][h_interior]);
    SetPlayerVirtualWorld(playerid, i);
    }
    else
    {
    //Vorm Haus Spawnen
    SetPlayerPos(playerid, hInfo[i][h_x], hInfo[i][h_y], hInfo[i][h_z]);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    }
    }
    }
    }


    Das war alles...


    Mit freundlichen Grüßen
    German_ScripterHD

  • if(sInfo[playerid][spawnpunkt] > 0)
    Setz davor mal das:
    sInfo[playerid][spawnpunkt] = 1;


    Dann funktioniert das aber, oder?

  • Habs jetzt so:


    sInfo[playerid][spawnpunkt] = 1;
    if(sInfo[playerid][spawnpunkt] > 0)
    {
    for(new i=0; i<sizeof(hInfo); i++)
    {


    Das klappt.


    Aber noch ein zweiter Bug... wenn ich jetzt im Haus spawn klappt mein ocmd:enterexit nicht mehr...


    Code:


    ocmd:enterexit(playerid,params[])
    {
    for(new i = 0; i != MAX_HOUSES; i++)//Haus Exit zu Enter
    {
    if(hInfo[i][h_id] == GetPlayerVirtualWorld(playerid))
    {
    if(IsPlayerInRangeOfPoint(playerid, 5, hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]))
    {
    SetPlayerPos(playerid, hInfo[i][h_x], hInfo[i][h_y], hInfo[i][h_z]);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerInterior(playerid, 0);
    return 1;
    }
    }
    }
    for(new i=0; i<sizeof(hInfo); i++)
    {
    if(!hInfo[i][h_id])continue;
    if(hInfo[i][ih_x]==0.0)continue;
    if(!IsPlayerInRangeOfPoint(playerid,2,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]))continue;
    SetPlayerPos(playerid,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]);
    SetPlayerInterior(playerid,hInfo[i][h_interior]);
    SetPlayerVirtualWorld(playerid,hInfo[i][h_id]);
    if(IsPlayerMieter(playerid,hInfo[i][h_id])) SendClientMessage(playerid,COLOR_GRAY,"Mieter...");
    return 1;
    }
    return 1;
    }


    Mit freundlichen Grüßen
    German_ScripterHD

  • Das klappt.


    Ja, das habe ich mir gedacht, das ist aber nicht die Lösung von dem Problem. Irgendwo im Script wirst du das irgendwie zurücksetzen, wie oder wo du das machst das weiß ich nicht. Am besten du suchst im ganzen Script noch einmal nach, vielleicht findest du ja was. Falls du Includes oder Filterscripts verwendest, da auch nochmals suchen (nur die, die du selbst geschrieben hast).



    Zu dem Befehl:
    Das reicht eigentlich, wenn du das so schreibst:
    ocmd:enterexit(playerid,params[])
    {
    for(new i;i<sizeof hInfo;i++)
    {
    if(GetPlayerVirtualWorld(playerid) == 0 && IsPlayerInRangeOfPoint(playerid,2,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]))
    {
    SetPlayerPos(playerid,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]);
    SetPlayerInterior(playerid,hInfo[i][h_interior]);
    SetPlayerVirtualWorld(playerid,hInfo[i][h_id]);
    if(IsPlayerMieter(playerid,hInfo[i][h_id]))SendClientMessage(playerid,COLOR_GRAY,"Mieter...");
    break;
    }
    else if(GetPlayerVirtualWorld(playerid) == hInfo[i][h_id])
    {
    if(IsPlayerInRangeOfPoint(playerid,5,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]))
    {
    SetPlayerPos(playerid,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerInterior(playerid,0);
    break;
    }
    }
    }
    return 1;
    }

  • Ja, das habe ich mir gedacht, das ist aber nicht die Lösung von dem Problem. Irgendwo im Script wirst du das irgendwie zurücksetzen, wie oder wo du das machst das weiß ich nicht. Am besten du suchst im ganzen Script noch einmal nach, vielleicht findest du ja was. Falls du Includes oder Filterscripts verwendest, da auch nochmals suchen (nur die, die du selbst geschrieben hast).


    Würde es vllt. funktioieren wenn ich den Variablenname umbennene?



    Wenn ich im Haus spawn, funkioniert ocmd:enterexit nicht, wenn ich mich aber töte, und gege danach zu den Haus, und tippe /enterexit, komme ich ins Haus und auch wieder raus.


    Mit freundlichen Grüßen
    German_ScripterHD

  • Würde es vllt. funktioieren wenn ich den Variablenname umbennene?


    Kannst du ja mal versuchen, ob das aber wirklich funktioniert ist fraglich. Aber versuchen kannst du das natürlich. ;)




    Wegen dem Befehl:
    ocmd:enterexit(playerid,params[])
    {
    for(new i;i<sizeof hInfo;i++)
    {
    if(GetPlayerVirtualWorld(playerid) == 0 && IsPlayerInRangeOfPoint(playerid,2,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]))
    {
    SetPlayerPos(playerid,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]);
    SetPlayerInterior(playerid,hInfo[i][h_interior]);
    SetPlayerVirtualWorld(playerid,hInfo[i][h_id]);
    if(IsPlayerMieter(playerid,hInfo[i][h_id]))SendClientMessage(playerid,COLOR_GRAY,"Mieter...");
    break;
    }
    else if(GetPlayerVirtualWorld(playerid) == hInfo[i][h_id])
    {
    printf("World: %d - h_id: %d",GetPlayerVirtualWorld(playerid),hInfo[i][h_id]);
    if(IsPlayerInRangeOfPoint(playerid,5,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]))
    {
    print("IsInRange => Teleport");
    SetPlayerPos(playerid,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]);
    SetPlayerVirtualWorld(playerid,0);
    SetPlayerInterior(playerid,0);
    break;
    }
    }
    }
    return 1;
    }

    Was wird geprintet, wenn du nach dem einloggen im Haus gespawnt wirst, und versuchst mit "/enterexit" aus dem Haus zu gehen?

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen