24.01.2011, 15:33
(
Последний раз редактировалось JaTochNietDan; 24.01.2011 в 16:55.
)
Hi,
I am working on my own FilterScript of the LS Elevator and I have a question about the public OnObjectMoved(objectid)
This is what I have:
This is for going to floor 0 wich is the street level.
For the first floor i have this:
as public I have this:
When I test this out In-Game it keeps saying "Elevator is already moving. Wait a few seconds" this message is triggered when the elevator is moving:
(else is for if(ElevatorState = ELEVATOR_STATE_IDLE)
Can anyone help me with resolving this problem? Because what i'm trying to do is to have ELEVATOR_STATE_MOVING when it moves and ELEVATOR_STATE_IDLE when it is Idle (when it stopped moving).
Fixed. We got the original lselevator working.
I am working on my own FilterScript of the LS Elevator and I have a question about the public OnObjectMoved(objectid)
This is what I have:
Quote:
if(ElevatorState == ELEVATOR_STATE_IDLE) { if(floor == 0) { SendClientMessage( playerid, WHITE, "You selected the Ground Floor" ); MoveDynamicObject(Elevator, 1786.678100, -1303.459472, 14.551476, 5); ElevatorState = ELEVATOR_STATE_MOVING; return 1; } |
For the first floor i have this:
Quote:
if(floor == 1) { SendClientMessage( playerid, WHITE, "You selected the 1st Floor" ); MoveDynamicObject(Elevator, 1786.678100, -1303.459472, 23.059376, 5); ElevatorState = ELEVATOR_STATE_MOVING; return 1; } |
Quote:
public OnObjectMoved(objectid) { if(objectid == Elevator) { ElevatorState = ELEVATOR_STATE_IDLE; return 1; } return 1; } |
Quote:
else { SendClientMessage(playerid, WHITE, "Elevator is already moving. Wait a few Seconds"); return 1; } |
Can anyone help me with resolving this problem? Because what i'm trying to do is to have ELEVATOR_STATE_MOVING when it moves and ELEVATOR_STATE_IDLE when it is Idle (when it stopped moving).
Fixed. We got the original lselevator working.