[FilterScript] ACC Lift (SF aircraft carrier moving lifts)
#1

ACC Lift 1.0
by Mike
Introduction

This filterscript removes the default lift objects from the aircraft carrier at Easter Basin Naval Station, then re-creates them with the ability for them to be moved.

Here is a video showing exactly what this filterscript does:
[ame]http://www.youtube.com/watch?v=FJGPLtlpyVo[/ame]

Usage

There are 2 functions is this filterscript:

ACC_MoveLift(lift, updown=-1, Float:speed=1.0)
Function: Moves the specified lift
- lift: The ID of the lift to move (0-main 1-side)
- updown: The direction in which to move the lift (-1=up/down depending on current status 0=down 1=up)
- speed: This is the speed at which the lift moves. 1 by default.
Notes: The 'updown' value will default to -1. Using "ACC_MoveLift(0);" will move lift 0 (main) up if it is down, or down if it is up.

ACC_GetLiftStatus(lift)
Function: Get the status of the specified lift
- lift: The ID of the lift to get the status of (0-main 1-side)

Код:
Lift statuses:

LIFT_STATUS_UP 0
LIFT_STATUS_LOWERING 1
LIFT_STATUS_RISING 2
LIFT_STATUS_DOWN 3
Here are some examples of the usage of ACC_MoveLift:

pawn Код:
ACC_MoveLift(0); // Move the main lift, will move it up if it is down and down if it is up

ACC_MoveLift(0, 1, 2.0); // Raise (1) the main lift (0) at 2x speed (2.0)

ACC_MoveLift(1, 0); // Lower (0) the side lift (1)
Here are two command examples to raise/lower the lifts (used in the video above):

pawn Код:
dcmd_lift(playerid, params[])
{
    ACC_MoveLift(0);
    if(ACC_GetLiftStatus(0) == LIFT_STATUS_RISING) SendClientMessage(playerid, ACC_COLOR, "Lift rising.");
    else SendClientMessage(playerid, ACC_COLOR, "Lift lowering.");
    return 1;
}

dcmd_sidelift(playerid, params[])
{
    ACC_MoveLift(1);
    if(ACC_GetLiftStatus(1) == LIFT_STATUS_RISING) SendClientMessage(playerid, ACC_COLOR, "Side lift rising.");
    else SendClientMessage(playerid, ACC_COLOR, "Side lift lowering.");
    return 1;
}
Installation

• Download the .pwn file below (or pre-compiled .amx)
• Place it in C:\Program Files\Rockstar Games\GTA San Andreas\filterscripts
• Open server.cfg (in GTA directory) and add 'ACC_lift' after 'filterscripts'
• If there is no 'filterscripts' line in your server.cfg, add 'filterscripts ACC_Lift'

IMPORTANT: This filterscript MUST be the FIRST filterscript on the 'filterscripts' line in server.cfg - if it's not OnPlayerConnect won't be called and the default lifts will not be removed. If you remove the objects in your gamemode already, it doesn't matter.

Download

http://pastebin.com/DvUugcJW

No mirrors please. If the links happen to go down PM me and I'll get another one up.

NOTE: This filterscript makes use of RemoveBuildingForPlayer in SA:MP 0.3d. It will NOT WORK in previous versions.

Thank you!

Please leave a comment below, perhaps a suggestion. Also please report any bugs/issues.

You may do with this script as you please; modify it, distribute it, whatever!

Thank you.
Reply


Messages In This Thread
ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 25.09.2011, 18:32
Re: ACC Lift (SF aircraft carrier moving lifts) - by sherlock - 25.09.2011, 19:18
Re: ACC Lift (SF aircraft carrier moving lifts) - by olaf137 - 25.09.2011, 19:46
Re: ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 25.09.2011, 21:03
Re: ACC Lift (SF aircraft carrier moving lifts) - by OKStyle - 26.09.2011, 02:00
Re: ACC Lift (SF aircraft carrier moving lifts) - by dylanando - 26.09.2011, 04:45
Re: ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 26.09.2011, 05:48
Re: ACC Lift (SF aircraft carrier moving lifts) - by Gamer_Z - 26.09.2011, 05:57
Re: ACC Lift (SF aircraft carrier moving lifts) - by OKStyle - 26.09.2011, 06:58
Re: ACC Lift (SF aircraft carrier moving lifts) - by Gamer_Z - 26.09.2011, 14:40
Re: ACC Lift (SF aircraft carrier moving lifts) - by sherlock - 26.09.2011, 16:03
Re: ACC Lift (SF aircraft carrier moving lifts) - by aRoach - 26.09.2011, 16:20
Re: ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 27.09.2011, 12:52
Re: ACC Lift (SF aircraft carrier moving lifts) - by ricardo178 - 04.10.2011, 15:31
Re: ACC Lift (SF aircraft carrier moving lifts) - by davve95 - 04.10.2011, 15:34
Re : ACC Lift (SF aircraft carrier moving lifts) - by TheBest6 - 04.10.2011, 16:23
Re: ACC Lift (SF aircraft carrier moving lifts) - by sansko - 04.11.2011, 20:22
Re: ACC Lift (SF aircraft carrier moving lifts) - by khaqatar - 05.11.2011, 08:39
Re: ACC Lift (SF aircraft carrier moving lifts) - by Astralis - 18.11.2011, 19:19
Re: ACC Lift (SF aircraft carrier moving lifts) - by Gamer_Z - 18.11.2011, 20:11
Re: ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 18.11.2011, 20:23
Re: ACC Lift (SF aircraft carrier moving lifts) - by Gamer_Z - 18.11.2011, 20:39
Re: ACC Lift (SF aircraft carrier moving lifts) - by GangsTa_ - 18.11.2011, 20:41
Re: ACC Lift (SF aircraft carrier moving lifts) - by DANGER1979 - 04.12.2011, 10:25
Re: ACC Lift (SF aircraft carrier moving lifts) - by iPeanut - 04.12.2011, 10:27
Re: ACC Lift (SF aircraft carrier moving lifts) - by jheb - 10.02.2012, 12:38
Re: ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 11.02.2012, 23:20
Re: ACC Lift (SF aircraft carrier moving lifts) - by Vasu99 - 31.03.2012, 07:44
Re: ACC Lift (SF aircraft carrier moving lifts) - by Vasu99 - 31.03.2012, 07:49
Re: ACC Lift (SF aircraft carrier moving lifts) - by MP2 - 31.03.2012, 18:45
Re : ACC Lift (SF aircraft carrier moving lifts) - by Abdeldu06 - 26.01.2014, 17:24
Re: ACC Lift (SF aircraft carrier moving lifts) - by AchievementMaster360 - 05.03.2014, 01:03

Forum Jump:


Users browsing this thread: 1 Guest(s)