Fire Department Tore gehen nicht runter.

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 diese Wie folgt bei OnGameModeInit erstellt:


    fdtor[0] = SetObjectMaterial(CreateObject(2957, -257.95999, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    fdtor[1] = SetObjectMaterial(CreateObject(2957, -251.85001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    fdtor[2] = SetObjectMaterial(CreateObject(2957, -245.74001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);



    Und dann diesen Code geschrieben wenn man die Taste H Ingame drückt.
    if(IsPlayerInRangeOfPoint(playerid,6,-257.95999, 1210.00000, 20.37000))
    {
    if(GetPVarInt(Server1,"fdtor1") == 0)
    {
    MoveObject(fdtor[0],-257.95999, 1210.00000, 20.37000-3.5,0.50);
    SetPVarInt(Server1,"fdtor1",1);
    SendClientMessage(playerid,GRÜN,"Fire Department Tor 1 geöffnet.");
    return 1;
    }
    if(GetPVarInt(Server1,"fdtor1") == 1)
    {
    MoveObject(fdtor[0],-257.95999, 1210.00000, 20.37000,0.50);
    SetPVarInt(Server1,"fdtor1",0);
    SendClientMessage(playerid,GRÜN,"Fire Department Tor 1 geschlossen.");
    return 1;
    }
    }
    if(IsPlayerInRangeOfPoint(playerid,6,-251.85001, 1210.00000, 20.37000))
    {
    if(GetPVarInt(Server1,"fdtor2") == 0)
    {
    MoveObject(fdtor[1],-251.85001, 1210.00000, 20.37000-3.5,0.50);
    SetPVarInt(Server1,"fdtor2",1);
    SendClientMessage(playerid,GRÜN,"Fire Department Tor 2 geöffnet.");
    return 1;
    }
    if(GetPVarInt(Server1,"fdtor2") == 1)
    {
    MoveObject(fdtor[1],-251.85001, 1210.00000, 20.37000,0.50);
    SetPVarInt(Server1,"fdtor2",0);
    SendClientMessage(playerid,GRÜN,"Fire Department Tor 2 geschlossen.");
    return 1;
    }
    }
    if(IsPlayerInRangeOfPoint(playerid,6,-245.74001, 1210.00000, 20.37000))
    {
    if(GetPVarInt(Server1,"fdtor3") == 0)
    {
    MoveObject(fdtor[2],-245.74001, 1210.00000, 20.37000-3.5,0.50);
    SetPVarInt(Server1,"fdtor3",1);
    SendClientMessage(playerid,GRÜN,"Fire Department Tor 3 geöffnet.");
    return 1;
    }
    if(GetPVarInt(Server1,"fdtor3") == 1)
    {
    MoveObject(fdtor[2],-245.74001, 1210.00000, 20.37000,0.50);
    SetPVarInt(Server1,"fdtor3",0);
    SendClientMessage(playerid,GRÜN,"Fire Department Tor 3 geschlosen.");
    return 1;
    }
    }



    Warum gehen nun die Tore nicht runter ?

  • fdtor[0] = SetObjectMaterial(CreateObject(2957, -257.95999, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    fdtor[1] = SetObjectMaterial(CreateObject(2957, -251.85001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    fdtor[2] = SetObjectMaterial(CreateObject(2957, -245.74001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);


    zu


    fdtor[0] = CreateObject(2957, -257.95999, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000);
    fdtor[1] = CreateObject(2957, -251.85001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000);
    fdtor[2] = CreateObject(2957, -245.74001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000);
    SetObjectMaterial(fdtor[0], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    SetObjectMaterial(fdtor[1], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    SetObjectMaterial(fdtor[2], 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);

  • Alternativ geht es auch so, wenn er es in einer Zeile behalten will:
    SetObjectMaterial((fdtor[0]=CreateObject(2957, -257.95999, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000)), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    SetObjectMaterial((fdtor[1]=CreateObject(2957, -251.85001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000)), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);
    SetObjectMaterial((fdtor[2]=CreateObject(2957, -245.74001, 1210.00000, 20.37000, 0.00000, 0.00000, 0.00000)), 0, 11008, "firehouse_sfse", "ws_rollerdoor_fire", 0xFFFFFFFF);

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