Automatic Closing Doors
#1

Hello!

I have a mapped Fire Station, but I need to script the garage door commands. I want to do it in a dialog, where you can control each door seperately. I want to have two choices when opening each door, whether to keep it open, or it to close 20 seconds later. How can I script it so the door will close 20 seconds after it has been opened?
Reply
#2

Post in the correct section then someone may consider helping you.
Reply
#3

pawn Код:
new DoorOpened;
forward CloseDoor();

    if(strcmp(string, "/opendoor", true) == 0)
    {
    if(DoorOpened == 1)
        {
             SendClientMessage(playerid, COLOR_RED, "The door is already opened");
             return 1;
        }
        DoorOpened = 1;
        SetTimer("CloseDoor", 20000, 0);
    }

public CloseDoor()
{
    MoveObject(....)
    DoorOpened = 0;
}
Post in the right section next time. Use the Script Request Thread.
Reply
#4

I wasn't asking for it to be done, just was wanting to know how it CAN be done. Thanks though, +rep.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)