25.09.2011, 18:32
(
Последний раз редактировалось MP2; 22.01.2013 в 19:19.
)
ACC Lift 1.0
by Mike
Introductionby Mike
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
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)
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;
}
• 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.