Beiträge von N3xiz

    Guten Abend,


    ich habe mir ein Filterscript gedownloadet weil ich nicht wusste wie ich so nen Aufzug mache.
    Jetzt ist das Problem er fährt nicht runter ^^ ich hoffe mal mir kann jemand helfen.


    #include <a_samp>


    #define ELEVATOR_SPEED (5.0) // Movement speed of the elevator.
    #define DOORS_SPEED (4.0) // Movement speed of the doors.
    #define ELEVATOR_WAIT_TIME (5000) // Time in ms that the elevator will wait in each floor before continuing with the queue.
    // Be sure to give enough time for doors to open.


    #define DIALOG_ID (874)


    // Private:
    #define X_DOOR_CLOSED (1786.627685)
    #define X_DOOR_R_OPENED (1785.027685)
    #define X_DOOR_L_OPENED (1788.227685)
    #define GROUND_Z_COORD (14.511476)
    #define ELEVATOR_OFFSET (0.059523)


    /* ------------------
    // Constants:
    -------------------*/
    static FloorNames[21][] =
    {
    "Eingang/Ausgang",
    "Stock 1.",
    "Stock 2.",
    "Stock 3.",
    "Stock 4.",
    "Stock 5.",
    "Stock 6.",
    "Stock 7.",
    "Stock 8.",
    "Stock 9.",
    "Stock 10.",
    "Stock 11.",
    "Stock 12.",
    "Stock 13.",
    "Stock 14.",
    "Stock 15.",
    "Stock 16.",
    "Stock 17.",
    "Stock 18.",
    "Stock 19.",
    "Admin Büro"
    };


    static Float:FloorZOffsets[21] =
    {
    0.0, // 0.0,
    8.5479, // 8.5479,
    13.99945, // 8.5479 + (5.45155 * 1.0),
    19.45100, // 8.5479 + (5.45155 * 2.0),
    24.90255, // 8.5479 + (5.45155 * 3.0),
    30.35410, // 8.5479 + (5.45155 * 4.0),
    35.80565, // 8.5479 + (5.45155 * 5.0),
    41.25720, // 8.5479 + (5.45155 * 6.0),
    46.70875, // 8.5479 + (5.45155 * 7.0),
    52.16030, // 8.5479 + (5.45155 * 8.0),
    57.61185, // 8.5479 + (5.45155 * 9.0),
    63.06340, // 8.5479 + (5.45155 * 10.0),
    68.51495, // 8.5479 + (5.45155 * 11.0),
    73.96650, // 8.5479 + (5.45155 * 12.0),
    79.41805, // 8.5479 + (5.45155 * 13.0),
    84.86960, // 8.5479 + (5.45155 * 14.0),
    90.32115, // 8.5479 + (5.45155 * 15.0),
    95.77270, // 8.5479 + (5.45155 * 16.0),
    101.22425, // 8.5479 + (5.45155 * 17.0),
    106.67580, // 8.5479 + (5.45155 * 18.0),
    112.12735 // 8.5479 + (5.45155 * 19.0)
    };


    /* ------------------
    // Variables:
    -------------------*/
    new Obj_Elevator, Obj_ElevatorDoors[2],
    Obj_FloorDoors[21][2];


    new Text3D:Label_Elevator, Text3D:Label_Floors[21];


    #define ELEVATOR_STATE_IDLE (0)
    #define ELEVATOR_STATE_WAITING (1)
    #define ELEVATOR_STATE_MOVING (2)


    new ElevatorState,
    ElevatorFloor; // If Idle or Waiting, this is the current floor. If Moving, the floor it's moving to.


    #define INVALID_FLOOR (-1)


    new ElevatorQueue[21], // Floors in queue.
    FloorRequestedBy[21]; // FloorRequestedBy[floor_id] = playerid; - Points out who requested which floor.


    new ElevatorBoostTimer; // Timer that makes the elevator move faster after players start surfing the object.


    /* ------------------
    * Function forwards:
    -------------------*/
    // Public:
    forward CallElevator(playerid, floorid); // You can use INVALID_PLAYER_ID too.
    forward ShowElevatorDialog(playerid);


    // Private:
    forward Elevator_Initialize();
    forward Elevator_Destroy();


    forward Elevator_OpenDoors();
    forward Elevator_CloseDoors();
    forward Floor_OpenDoors(floorid);
    forward Floor_CloseDoors(floorid);


    forward Elevator_MoveToFloor(floorid);
    forward Elevator_Boost(floorid); // Increases the elevator speed until it reaches 'floorid'.
    forward Elevator_TurnToIdle();


    forward ReadNextFloorInQueue();
    forward RemoveFirstQueueFloor();
    forward AddFloorToQueue(floorid);
    forward IsFloorInQueue(floorid);
    forward ResetElevatorQueue();


    forward DidPlayerRequestElevator(playerid);


    forward Float:GetElevatorZCoordForFloor(floorid);
    forward Float:GetDoorsZCoordForFloor(floorid);


    // ------------------------ Callbacks ------------------------
    public OnFilterScriptInit()
    {
    ResetElevatorQueue();
    Elevator_Initialize();


    return 1;
    }


    public OnFilterScriptExit()
    {
    Elevator_Destroy();


    return 1;
    }


    public OnObjectMoved(objectid)
    {
    new Float:x, Float:y, Float:z;
    for(new i; i < sizeof(Obj_FloorDoors); i ++)
    {
    if(objectid == Obj_FloorDoors[i][0])
    {
    GetObjectPos(Obj_FloorDoors[i][0], x, y, z);


    if(x < X_DOOR_L_OPENED - 0.5) // Some floor doors have shut, move the elevator to next floor in queue:
    {
    Elevator_MoveToFloor(ElevatorQueue[0]);
    RemoveFirstQueueFloor();
    }
    }
    }


    if(objectid == Obj_Elevator) // The elevator reached the specified floor.
    {
    KillTimer(ElevatorBoostTimer); // Kills the timer, in case the elevator reached the floor before boost.


    FloorRequestedBy[ElevatorFloor] = INVALID_PLAYER_ID;


    Elevator_OpenDoors();
    Floor_OpenDoors(ElevatorFloor);


    GetObjectPos(Obj_Elevator, x, y, z);
    Label_Elevator = Create3DTextLabel("Benutzen Sie 'F' um den Aufzug zu Benutzen!", 0xFFFFDD, 1784.9822, -1302.0426, z - 0.9, 4.0, 0, 1);


    ElevatorState = ELEVATOR_STATE_WAITING;
    SetTimer("Elevator_TurnToIdle", ELEVATOR_WAIT_TIME, 0);
    }


    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_ID)
    {
    if(!response)
    return 0;


    if(FloorRequestedBy[listitem] != INVALID_PLAYER_ID || IsFloorInQueue(listitem))
    GameTextForPlayer(playerid, "~r~Der Stock ist bereits in der Warteschlange", 3500, 4);
    else if(DidPlayerRequestElevator(playerid))
    GameTextForPlayer(playerid, "~r~Sie haben bereits den Aufzug gerufen.", 3500, 4);
    else
    CallElevator(playerid, listitem);


    return 1;
    }


    return 0;
    }


    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SECONDARY_ATTACK)
    {
    new Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    if(pos[1] < -1301.4 && pos[1] > -1303.2417 && pos[0] < 1786.2131 && pos[0] > 1784.1555) // He is using the elevator button
    ShowElevatorDialog(playerid);
    else // Is he in a floor button?
    {
    if(pos[1] > -1301.4 && pos[1] < -1299.1447 && pos[0] < 1785.6147 && pos[0] > 1781.9902)
    {
    // He is most likely using it, check floor:
    new i=20;
    while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0)
    i --;


    if(i == 0 && pos[2] < GetDoorsZCoordForFloor(0) + 2.0)
    i = -1;


    if(i <= 19)
    {
    CallElevator(playerid, i + 1);
    GameTextForPlayer(playerid, "~r~Aufzug gerufen, BITTE WARTEN...", 3500, 4);
    }
    }
    }
    }


    return 1;
    }


    // ------------------------ Functions ------------------------
    stock Elevator_Initialize()
    {
    // Initializes the elevator.


    Obj_Elevator = CreateObject(18755, 1786.678100, -1303.459472, GROUND_Z_COORD + ELEVATOR_OFFSET, 0.000000, 0.000000, 270.000000);
    Obj_ElevatorDoors[0] = CreateObject(18757, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);
    Obj_ElevatorDoors[1] = CreateObject(18756, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);


    Label_Elevator = Create3DTextLabel("Benutzen Sie 'F' um den Aufzug zu Benutzen!", 0xFFFFDD, 1784.9822, -1302.0426, 13.6491, 4.0, 0, 1);


    new string[128],
    Float:z;


    for(new i; i < sizeof(Obj_FloorDoors); i ++)
    {
    Obj_FloorDoors[i][0] = CreateObject(18757, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);
    Obj_FloorDoors[i][1] = CreateObject(18756, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);


    format(string, sizeof(string), "%s\nBenutze 'F' um den Aufzug zu Rufen", FloorNames[i]);


    if(i == 0)
    z = 13.4713;
    else
    z = 13.4713 + 8.7396 + ((i-1) * 5.45155);


    Label_Floors[i] = Create3DTextLabel(string, 0xFFFFDD, 1783.9799, -1300.7660, z, 10.5, 0, 1);
    // Label_Elevator, Text3D:Label_Floors[21];
    }


    // Open ground floor doors:
    Floor_OpenDoors(0);
    Elevator_OpenDoors();


    return 1;
    }


    stock Elevator_Destroy()
    {
    // Destroys the elevator.


    DestroyObject(Obj_Elevator);
    DestroyObject(Obj_ElevatorDoors[0]);
    DestroyObject(Obj_ElevatorDoors[1]);
    Delete3DTextLabel(Label_Elevator);


    for(new i; i < sizeof(Obj_FloorDoors); i ++)
    {
    DestroyObject(Obj_FloorDoors[i][0]);
    DestroyObject(Obj_FloorDoors[i][1]);
    Delete3DTextLabel(Label_Floors[i]);
    }


    return 1;
    }


    stock Elevator_OpenDoors()
    {
    // Opens the elevator's doors.


    new Float:x, Float:y, Float:z;


    GetObjectPos(Obj_ElevatorDoors[0], x, y, z);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_L_OPENED, y, z, DOORS_SPEED);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_R_OPENED, y, z, DOORS_SPEED);


    return 1;
    }


    stock Elevator_CloseDoors()
    {
    // Closes the elevator's doors.


    if(ElevatorState == ELEVATOR_STATE_MOVING)
    return 0;


    new Float:x, Float:y, Float:z;


    GetObjectPos(Obj_ElevatorDoors[0], x, y, z);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, y, z, DOORS_SPEED);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, y, z, DOORS_SPEED);


    return 1;
    }


    stock Floor_OpenDoors(floorid)
    {
    // Opens the doors at the specified floor.


    MoveObject(Obj_FloorDoors[floorid][0], X_DOOR_L_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
    MoveObject(Obj_FloorDoors[floorid][1], X_DOOR_R_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);


    return 1;
    }


    stock Floor_CloseDoors(floorid)
    {
    // Closes the doors at the specified floor.


    MoveObject(Obj_FloorDoors[floorid][0], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
    MoveObject(Obj_FloorDoors[floorid][1], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);


    return 1;
    }


    stock Elevator_MoveToFloor(floorid)
    {
    // Moves the elevator to specified floor (doors are meant to be already closed).


    ElevatorState = ELEVATOR_STATE_MOVING;
    ElevatorFloor = floorid;


    // Move the elevator slowly, to give time to clients to sync the object surfing. Then, boost it up:
    MoveObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), 0.5);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.5);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.5);
    Delete3DTextLabel(Label_Elevator);


    ElevatorBoostTimer = SetTimerEx("Elevator_Boost", 2000, 0, "i", floorid);


    return 1;
    }


    public Elevator_Boost(floorid)
    {
    // Increases the elevator's speed until it reaches 'floorid'


    MoveObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), ELEVATOR_SPEED);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);


    return 1;
    }


    public Elevator_TurnToIdle()
    {
    ElevatorState = ELEVATOR_STATE_IDLE;
    ReadNextFloorInQueue();


    return 1;
    }


    stock RemoveFirstQueueFloor()
    {
    // Removes the data in ElevatorQueue[0], and reorders the queue accordingly.


    for(new i; i < sizeof(ElevatorQueue) - 1; i ++)
    ElevatorQueue[i] = ElevatorQueue[i + 1];


    ElevatorQueue[sizeof(ElevatorQueue) - 1] = INVALID_FLOOR;


    return 1;
    }


    stock AddFloorToQueue(floorid)
    {
    // Adds 'floorid' at the end of the queue.


    // Scan for the first empty space:
    new slot = -1;
    for(new i; i < sizeof(ElevatorQueue); i ++)
    {
    if(ElevatorQueue[i] == INVALID_FLOOR)
    {
    slot = i;
    break;
    }
    }


    if(slot != -1)
    {
    ElevatorQueue[slot] = floorid;


    // If needed, move the elevator.
    if(ElevatorState == ELEVATOR_STATE_IDLE)
    ReadNextFloorInQueue();


    return 1;
    }


    return 0;
    }


    stock ResetElevatorQueue()
    {
    // Resets the queue.


    for(new i; i < sizeof(ElevatorQueue); i ++)
    {
    ElevatorQueue[i] = INVALID_FLOOR;
    FloorRequestedBy[i] = INVALID_PLAYER_ID;
    }


    return 1;
    }


    stock IsFloorInQueue(floorid)
    {
    // Checks if the specified floor is currently part of the queue.


    for(new i; i < sizeof(ElevatorQueue); i ++)
    if(ElevatorQueue[i] == floorid)
    return 1;


    return 0;
    }


    stock ReadNextFloorInQueue()
    {
    // Reads the next floor in the queue, closes doors, and goes to it.


    if(ElevatorState != ELEVATOR_STATE_IDLE || ElevatorQueue[0] == INVALID_FLOOR)
    return 0;


    Elevator_CloseDoors();
    Floor_CloseDoors(ElevatorFloor);


    return 1;
    }


    stock DidPlayerRequestElevator(playerid)
    {
    for(new i; i < sizeof(FloorRequestedBy); i ++)
    if(FloorRequestedBy[i] == playerid)
    return 1;


    return 0;
    }


    stock ShowElevatorDialog(playerid)
    {
    new string[512];
    for(new i; i < sizeof(ElevatorQueue); i ++)
    {
    if(FloorRequestedBy[i] != INVALID_PLAYER_ID)
    strcat(string, "{FF0000}");


    strcat(string, FloorNames[i]);
    strcat(string, "\n");
    }


    ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_LIST, "Aufzug", string, "Auswählen", "Abbrechen");


    return 1;
    }


    stock CallElevator(playerid, floorid)
    {
    // Calls the elevator (also used with the elevator dialog).


    if(FloorRequestedBy[floorid] != INVALID_PLAYER_ID || IsFloorInQueue(floorid))
    return 0;


    FloorRequestedBy[floorid] = playerid;
    AddFloorToQueue(floorid);


    return 1;
    }


    stock Float:GetElevatorZCoordForFloor(floorid)
    return (GROUND_Z_COORD + FloorZOffsets[floorid] + ELEVATOR_OFFSET); // A small offset for the elevator object itself.


    stock Float:GetDoorsZCoordForFloor(floorid)
    return (GROUND_Z_COORD + FloorZOffsets[floorid]);
    @Filterscript von nils.manuel

    Guten Abend,


    ich habe mir ein Filterscript gedownloadet weil ich nicht wusste wie ich so nen Aufzug mache.
    Jetzt ist das Problem er fährt nicht runter ^^ ich hoffe mal mir kann jemand helfen.

    Spoiler anzeigen
    #include <a_samp>

    Spoiler anzeigen
    #define ELEVATOR_SPEED (5.0) // Movement speed of the elevator.
    #define DOORS_SPEED (4.0) // Movement speed of the doors.
    #define ELEVATOR_WAIT_TIME (5000) // Time in ms that the elevator will wait in each floor before continuing with the queue.
    // Be sure to give enough time for doors to open.

    Spoiler anzeigen
    #define DIALOG_ID (874)

    Spoiler anzeigen
    // Private:
    #define X_DOOR_CLOSED (1786.627685)
    #define X_DOOR_R_OPENED (1785.027685)
    #define X_DOOR_L_OPENED (1788.227685)
    #define GROUND_Z_COORD (14.511476)
    #define ELEVATOR_OFFSET (0.059523)

    Spoiler anzeigen
    /* ------------------
    // Constants:
    -------------------*/
    static FloorNames[21][] =
    {
    "Eingang/Ausgang",
    "Stock 1.",
    "Stock 2.",
    "Stock 3.",
    "Stock 4.",
    "Stock 5.",
    "Stock 6.",
    "Stock 7.",
    "Stock 8.",
    "Stock 9.",
    "Stock 10.",
    "Stock 11.",
    "Stock 12.",
    "Stock 13.",
    "Stock 14.",
    "Stock 15.",
    "Stock 16.",
    "Stock 17.",
    "Stock 18.",
    "Stock 19.",
    "Admin Büro"
    };

    Spoiler anzeigen
    static Float:FloorZOffsets[21] =
    {
    0.0, // 0.0,
    8.5479, // 8.5479,
    13.99945, // 8.5479 + (5.45155 * 1.0),
    19.45100, // 8.5479 + (5.45155 * 2.0),
    24.90255, // 8.5479 + (5.45155 * 3.0),
    30.35410, // 8.5479 + (5.45155 * 4.0),
    35.80565, // 8.5479 + (5.45155 * 5.0),
    41.25720, // 8.5479 + (5.45155 * 6.0),
    46.70875, // 8.5479 + (5.45155 * 7.0),
    52.16030, // 8.5479 + (5.45155 * 8.0),
    57.61185, // 8.5479 + (5.45155 * 9.0),
    63.06340, // 8.5479 + (5.45155 * 10.0),
    68.51495, // 8.5479 + (5.45155 * 11.0),
    73.96650, // 8.5479 + (5.45155 * 12.0),
    79.41805, // 8.5479 + (5.45155 * 13.0),
    84.86960, // 8.5479 + (5.45155 * 14.0),
    90.32115, // 8.5479 + (5.45155 * 15.0),
    95.77270, // 8.5479 + (5.45155 * 16.0),
    101.22425, // 8.5479 + (5.45155 * 17.0),
    106.67580, // 8.5479 + (5.45155 * 18.0),
    112.12735 // 8.5479 + (5.45155 * 19.0)
    };

    Spoiler anzeigen
    /* ------------------
    // Variables:
    -------------------*/
    new Obj_Elevator, Obj_ElevatorDoors[2],
    Obj_FloorDoors[21][2];

    Spoiler anzeigen
    new Text3D:Label_Elevator, Text3D:Label_Floors[21];

    Spoiler anzeigen
    #define ELEVATOR_STATE_IDLE (0)
    #define ELEVATOR_STATE_WAITING (1)
    #define ELEVATOR_STATE_MOVING (2)

    Spoiler anzeigen
    new ElevatorState,
    ElevatorFloor; // If Idle or Waiting, this is the current floor. If Moving, the floor it's moving to.

    Spoiler anzeigen
    #define INVALID_FLOOR (-1)

    Spoiler anzeigen
    new ElevatorQueue[21], // Floors in queue.
    FloorRequestedBy[21]; // FloorRequestedBy[floor_id] = playerid; - Points out who requested which floor.

    Spoiler anzeigen
    new ElevatorBoostTimer; // Timer that makes the elevator move faster after players start surfing the object.

    Spoiler anzeigen
    /* ------------------
    * Function forwards:
    -------------------*/
    // Public:
    forward CallElevator(playerid, floorid); // You can use INVALID_PLAYER_ID too.
    forward ShowElevatorDialog(playerid);

    Spoiler anzeigen
    // Private:
    forward Elevator_Initialize();
    forward Elevator_Destroy();

    Spoiler anzeigen
    forward Elevator_OpenDoors();
    forward Elevator_CloseDoors();
    forward Floor_OpenDoors(floorid);
    forward Floor_CloseDoors(floorid);

    Spoiler anzeigen
    forward Elevator_MoveToFloor(floorid);
    forward Elevator_Boost(floorid); // Increases the elevator speed until it reaches 'floorid'.
    forward Elevator_TurnToIdle();

    Spoiler anzeigen
    forward ReadNextFloorInQueue();
    forward RemoveFirstQueueFloor();
    forward AddFloorToQueue(floorid);
    forward IsFloorInQueue(floorid);
    forward ResetElevatorQueue();

    Spoiler anzeigen
    forward DidPlayerRequestElevator(playerid);

    Spoiler anzeigen
    forward Float:GetElevatorZCoordForFloor(floorid);
    forward Float:GetDoorsZCoordForFloor(floorid);

    Spoiler anzeigen
    // ------------------------ Callbacks ------------------------
    public OnFilterScriptInit()
    {
    ResetElevatorQueue();
    Elevator_Initialize();

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    public OnFilterScriptExit()
    {
    Elevator_Destroy();

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    public OnObjectMoved(objectid)
    {
    new Float:x, Float:y, Float:z;
    for(new i; i < sizeof(Obj_FloorDoors); i ++)
    {
    if(objectid == Obj_FloorDoors[i][0])
    {
    GetObjectPos(Obj_FloorDoors[i][0], x, y, z);

    Spoiler anzeigen
    if(x < X_DOOR_L_OPENED - 0.5) // Some floor doors have shut, move the elevator to next floor in queue:
    {
    Elevator_MoveToFloor(ElevatorQueue[0]);
    RemoveFirstQueueFloor();
    }
    }
    }

    Spoiler anzeigen
    if(objectid == Obj_Elevator) // The elevator reached the specified floor.
    {
    KillTimer(ElevatorBoostTimer); // Kills the timer, in case the elevator reached the floor before boost.

    Spoiler anzeigen
    FloorRequestedBy[ElevatorFloor] = INVALID_PLAYER_ID;

    Spoiler anzeigen
    Elevator_OpenDoors();
    Floor_OpenDoors(ElevatorFloor);

    Spoiler anzeigen
    GetObjectPos(Obj_Elevator, x, y, z);
    Label_Elevator = Create3DTextLabel("Benutzen Sie 'F' um den Aufzug zu Benutzen!", 0xFFFFDD, 1784.9822, -1302.0426, z - 0.9, 4.0, 0, 1);

    Spoiler anzeigen
    ElevatorState = ELEVATOR_STATE_WAITING;
    SetTimer("Elevator_TurnToIdle", ELEVATOR_WAIT_TIME, 0);
    }

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_ID)
    {
    if(!response)
    return 0;

    Spoiler anzeigen
    if(FloorRequestedBy[listitem] != INVALID_PLAYER_ID || IsFloorInQueue(listitem))
    GameTextForPlayer(playerid, "~r~Der Stock ist bereits in der Warteschlange", 3500, 4);
    else if(DidPlayerRequestElevator(playerid))
    GameTextForPlayer(playerid, "~r~Sie haben bereits den Aufzug gerufen.", 3500, 4);
    else
    CallElevator(playerid, listitem);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    return 0;
    }

    Spoiler anzeigen
    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    if(!IsPlayerInAnyVehicle(playerid) && newkeys & KEY_SECONDARY_ATTACK)
    {
    new Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
    if(pos[1] < -1301.4 && pos[1] > -1303.2417 && pos[0] < 1786.2131 && pos[0] > 1784.1555) // He is using the elevator button
    ShowElevatorDialog(playerid);
    else // Is he in a floor button?
    {
    if(pos[1] > -1301.4 && pos[1] < -1299.1447 && pos[0] < 1785.6147 && pos[0] > 1781.9902)
    {
    // He is most likely using it, check floor:
    new i=20;
    while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0)
    i --;

    Spoiler anzeigen
    if(i == 0 && pos[2] < GetDoorsZCoordForFloor(0) + 2.0)
    i = -1;

    Spoiler anzeigen
    if(i <= 19)
    {
    CallElevator(playerid, i + 1);
    GameTextForPlayer(playerid, "~r~Aufzug gerufen, BITTE WARTEN...", 3500, 4);
    }
    }
    }
    }

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    // ------------------------ Functions ------------------------
    stock Elevator_Initialize()
    {
    // Initializes the elevator.

    Spoiler anzeigen
    Obj_Elevator = CreateObject(18755, 1786.678100, -1303.459472, GROUND_Z_COORD + ELEVATOR_OFFSET, 0.000000, 0.000000, 270.000000);
    Obj_ElevatorDoors[0] = CreateObject(18757, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);
    Obj_ElevatorDoors[1] = CreateObject(18756, X_DOOR_CLOSED, -1303.459472, GROUND_Z_COORD, 0.000000, 0.000000, 270.000000);

    Spoiler anzeigen
    Label_Elevator = Create3DTextLabel("Benutzen Sie 'F' um den Aufzug zu Benutzen!", 0xFFFFDD, 1784.9822, -1302.0426, 13.6491, 4.0, 0, 1);

    Spoiler anzeigen
    new string[128],
    Float:z;

    Spoiler anzeigen
    for(new i; i < sizeof(Obj_FloorDoors); i ++)
    {
    Obj_FloorDoors[i][0] = CreateObject(18757, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);
    Obj_FloorDoors[i][1] = CreateObject(18756, X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(i), 0.000000, 0.000000, 270.000000);

    Spoiler anzeigen
    format(string, sizeof(string), "%s\nBenutze 'F' um den Aufzug zu Rufen", FloorNames[i]);

    Spoiler anzeigen
    if(i == 0)
    z = 13.4713;
    else
    z = 13.4713 + 8.7396 + ((i-1) * 5.45155);

    Spoiler anzeigen
    Label_Floors[i] = Create3DTextLabel(string, 0xFFFFDD, 1783.9799, -1300.7660, z, 10.5, 0, 1);
    // Label_Elevator, Text3D:Label_Floors[21];
    }

    Spoiler anzeigen
    // Open ground floor doors:
    Floor_OpenDoors(0);
    Elevator_OpenDoors();

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Elevator_Destroy()
    {
    // Destroys the elevator.

    Spoiler anzeigen
    DestroyObject(Obj_Elevator);
    DestroyObject(Obj_ElevatorDoors[0]);
    DestroyObject(Obj_ElevatorDoors[1]);
    Delete3DTextLabel(Label_Elevator);

    Spoiler anzeigen
    for(new i; i < sizeof(Obj_FloorDoors); i ++)
    {
    DestroyObject(Obj_FloorDoors[i][0]);
    DestroyObject(Obj_FloorDoors[i][1]);
    Delete3DTextLabel(Label_Floors[i]);
    }

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Elevator_OpenDoors()
    {
    // Opens the elevator's doors.

    Spoiler anzeigen
    new Float:x, Float:y, Float:z;

    Spoiler anzeigen
    GetObjectPos(Obj_ElevatorDoors[0], x, y, z);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_L_OPENED, y, z, DOORS_SPEED);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_R_OPENED, y, z, DOORS_SPEED);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Elevator_CloseDoors()
    {
    // Closes the elevator's doors.

    Spoiler anzeigen
    if(ElevatorState == ELEVATOR_STATE_MOVING)
    return 0;

    Spoiler anzeigen
    new Float:x, Float:y, Float:z;

    Spoiler anzeigen
    GetObjectPos(Obj_ElevatorDoors[0], x, y, z);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, y, z, DOORS_SPEED);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, y, z, DOORS_SPEED);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Floor_OpenDoors(floorid)
    {
    // Opens the doors at the specified floor.

    Spoiler anzeigen
    MoveObject(Obj_FloorDoors[floorid][0], X_DOOR_L_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
    MoveObject(Obj_FloorDoors[floorid][1], X_DOOR_R_OPENED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Floor_CloseDoors(floorid)
    {
    // Closes the doors at the specified floor.

    Spoiler anzeigen
    MoveObject(Obj_FloorDoors[floorid][0], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);
    MoveObject(Obj_FloorDoors[floorid][1], X_DOOR_CLOSED, -1303.171142, GetDoorsZCoordForFloor(floorid), DOORS_SPEED);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Elevator_MoveToFloor(floorid)
    {
    // Moves the elevator to specified floor (doors are meant to be already closed).

    Spoiler anzeigen
    ElevatorState = ELEVATOR_STATE_MOVING;
    ElevatorFloor = floorid;

    Spoiler anzeigen
    // Move the elevator slowly, to give time to clients to sync the object surfing. Then, boost it up:
    MoveObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), 0.5);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.5);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), 0.5);
    Delete3DTextLabel(Label_Elevator);

    Spoiler anzeigen
    ElevatorBoostTimer = SetTimerEx("Elevator_Boost", 2000, 0, "i", floorid);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    public Elevator_Boost(floorid)
    {
    // Increases the elevator's speed until it reaches 'floorid'

    Spoiler anzeigen
    MoveObject(Obj_Elevator, 1786.678100, -1303.459472, GetElevatorZCoordForFloor(floorid), ELEVATOR_SPEED);
    MoveObject(Obj_ElevatorDoors[0], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);
    MoveObject(Obj_ElevatorDoors[1], X_DOOR_CLOSED, -1303.459472, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    public Elevator_TurnToIdle()
    {
    ElevatorState = ELEVATOR_STATE_IDLE;
    ReadNextFloorInQueue();

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock RemoveFirstQueueFloor()
    {
    // Removes the data in ElevatorQueue[0], and reorders the queue accordingly.

    Spoiler anzeigen
    for(new i; i < sizeof(ElevatorQueue) - 1; i ++)
    ElevatorQueue[i] = ElevatorQueue[i + 1];

    Spoiler anzeigen
    ElevatorQueue[sizeof(ElevatorQueue) - 1] = INVALID_FLOOR;

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock AddFloorToQueue(floorid)
    {
    // Adds 'floorid' at the end of the queue.

    Spoiler anzeigen
    // Scan for the first empty space:
    new slot = -1;
    for(new i; i < sizeof(ElevatorQueue); i ++)
    {
    if(ElevatorQueue[i] == INVALID_FLOOR)
    {
    slot = i;
    break;
    }
    }

    Spoiler anzeigen
    if(slot != -1)
    {
    ElevatorQueue[slot] = floorid;

    Spoiler anzeigen
    // If needed, move the elevator.
    if(ElevatorState == ELEVATOR_STATE_IDLE)
    ReadNextFloorInQueue();

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    return 0;
    }

    Spoiler anzeigen
    stock ResetElevatorQueue()
    {
    // Resets the queue.

    Spoiler anzeigen
    for(new i; i < sizeof(ElevatorQueue); i ++)
    {
    ElevatorQueue[i] = INVALID_FLOOR;
    FloorRequestedBy[i] = INVALID_PLAYER_ID;
    }

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock IsFloorInQueue(floorid)
    {
    // Checks if the specified floor is currently part of the queue.

    Spoiler anzeigen
    for(new i; i < sizeof(ElevatorQueue); i ++)
    if(ElevatorQueue[i] == floorid)
    return 1;

    Spoiler anzeigen
    return 0;
    }

    Spoiler anzeigen
    stock ReadNextFloorInQueue()
    {
    // Reads the next floor in the queue, closes doors, and goes to it.

    Spoiler anzeigen
    if(ElevatorState != ELEVATOR_STATE_IDLE || ElevatorQueue[0] == INVALID_FLOOR)
    return 0;

    Spoiler anzeigen
    Elevator_CloseDoors();
    Floor_CloseDoors(ElevatorFloor);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock DidPlayerRequestElevator(playerid)
    {
    for(new i; i < sizeof(FloorRequestedBy); i ++)
    if(FloorRequestedBy[i] == playerid)
    return 1;

    Spoiler anzeigen
    return 0;
    }

    Spoiler anzeigen
    stock ShowElevatorDialog(playerid)
    {
    new string[512];
    for(new i; i < sizeof(ElevatorQueue); i ++)
    {
    if(FloorRequestedBy[i] != INVALID_PLAYER_ID)
    strcat(string, "{FF0000}");

    Spoiler anzeigen
    strcat(string, FloorNames[i]);
    strcat(string, "\n");
    }

    Spoiler anzeigen
    ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_LIST, "Aufzug", string, "Auswählen", "Abbrechen");

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock CallElevator(playerid, floorid)
    {
    // Calls the elevator (also used with the elevator dialog).

    Spoiler anzeigen
    if(FloorRequestedBy[floorid] != INVALID_PLAYER_ID || IsFloorInQueue(floorid))
    return 0;

    Spoiler anzeigen
    FloorRequestedBy[floorid] = playerid;
    AddFloorToQueue(floorid);

    Spoiler anzeigen
    return 1;
    }

    Spoiler anzeigen
    stock Float:GetElevatorZCoordForFloor(floorid)
    return (GROUND_Z_COORD + FloorZOffsets[floorid] + ELEVATOR_OFFSET); // A small offset for the elevator object itself.

    Spoiler anzeigen
    stock Float:GetDoorsZCoordForFloor(floorid)
    return (GROUND_Z_COORD + FloorZOffsets[floorid]);


    @Filterscript von nils.manuel

    Guten Abend,


    ich möchte mit HDPVR² aufnehmen.
    Leider ist das Problem es nimmt die Tonspur auf aber nicht richtig also nicht synchron.
    Meine Frage kennt sich jemand damit aus wie ich das fixen kann?.


    Schon mal ein Danke voraus :love:




    Mit freundlcihen Grüßen
    N3xiz


    //Edit
    #Ich benutzte die Softwar Hauppauge Capture

    Guten Abend,



    Ich suche eine Woltlab Burning Board 3 Lizenz. Ich hätte jetzt 30 Euro Paysafecard zur verfügung.
    Wer interesse hat seine Lizenz zu verkaufen kann sich per PN melden.
    Ich nehme zur Sicherheit ein Mittelsmann.


    Ihr könnt mich per PN oder Skype(Skype Name über PN) erreichen.


    Mit freundlichen Grüßen
    N3xiz/Daniel


    ______
    Unverbindlicher Hinweis: Die Sicherheit einer Transaktion kann am besten durch die Einschaltung eines Mittelsmannes gewährleistet werden. Weitere Informationen dazu gibt es hier.

    Guten Morgen,
    ich habe mal so ne Frage ich möchte mir eine dynamic Signature erstellen habe leider keine Erfahrung mit PHP und HTML ^^
    Und zwar möchte ich mir eine dynamic Signature erstellen als normaler User.
    Das ganze sollte vom UCP abgelesen werden und auf der Signatur übertragen werde.
    Also z.B. welches Level ich bin und Fraktion.....



    Falls sich jemand auskennt damit würde ich mich über ein PN freuen und weiteres wird dort geklärt.


    @Admin Falls das der falsche bereich ist tut es mir leid und verschieb es bitte. ;)

    Guten Abend Liebe Com,
    Ich kann mein Server nicht Start weil ich ein kleines Problem habe
    [hide][20:58:30] [ERROR] CMySQLQuery::Execute[()] - (error #1146) Table 'samp.user' doesn't exist
    [/hide]


    Ein danke im Vorraus

    Ich fange erst grade an mit MySQL scripten

    #define db_host "127.0.0.1"
    #define db_user "samp"
    #define db_pass "******"
    #define db_db "samp"
    new dbhandle;
    dbhandle=mysql_connect(db_host,db_user,db_db,db_pass);
    {
    mysql_close(dbhandle);
    return 1;
    }

    Frage was bedeutet das also was meint er damit wo das passwort falsch ist
    das ganze script läuft auf mein PC

    SQL
    [19:42:27] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp'@'localhost' (using password: YES)
    [19:42:27] [ERROR] CMySQLConnection::Connect - (error #1045) Access denied for user 'samp'@'localhost' (using password: YES)

    Danke nur noch 5 Erros
    lanst d mir dabei noch helfen ?
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(17511) : error 017: undefined symbol "Time"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(17513) : error 017: undefined symbol "Time"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(60190) : error 017: undefined symbol "Time"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(61064) : error 017: undefined symbol "StripNewLine"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(61507) : warning 219: local variable "Spieler" shadows a variable at a preceding level
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(61538) : warning 219: local variable "Spieler" shadows a variable at a preceding level
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(62119) : error 017: undefined symbol "StripNewLine"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(62795) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Errors.

    Wo ran kann das liegen ?
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(17511) : error 017: undefined symbol "Time"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(17513) : error 017: undefined symbol "Time"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(18442) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(18442) : error 033: array must be indexed (variable "cmd")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(18992) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(18992) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19026) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19026) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19273) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19273) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19483) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19483) : error 033: array must be indexed (variable "x_nr")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19493) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19493) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19523) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19523) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19567) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19567) : error 033: array must be indexed (variable "x_nr")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19577) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19577) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19607) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19607) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19746) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19746) : error 033: array must be indexed (variable "tmp")
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19754) : error 017: undefined symbol "strtok"
    C:\Users\Daniel\Desktop\SAMP server\gamemodes\GER.pwn(19754) : error 033: array must be indexed (variable "tmp")


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


    Danke im Vorraus :S:love: