PDA

View Full Version : About new enterable building around santa maria


ilepopivanov
23/03/2015, 03:03 PM
In RC version i can't find filterscript. I want to add that code of map interior. I think this thread is not for here but..

Sry for bad english

Sledgehammer
23/03/2015, 04:23 PM
Hi,

It appears that the package 0.3.7-RC2 does not have many filerscripts. However, If you download 0.3.7-RC1 you may find the "new enterable building around santa maria".

I believe the script you are looking for is called "ls_beachside".

Path:
filerscripts/ls_beachside

When opening the script, you should see something similar to:

// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Example Filterscript for the new LS BeachSide Building with Elevator
// --------------------------------------------------------------------
// Original elevator code by Zamaroht in 2010
//
// Updated by Kye in 2011
// * Added a sound effect for the elevator starting/stopping
//
// Edited by Matite in January 2015
// * Added code to remove the existing building, add the new building and
// adapted the elevator code so it works in this new building
//
//
// This script creates the new LS BeachSide 1 building object, removes the
// existing GTASA LS BeachSide building object and creates an elevator that
// can be used to travel between the building foyer and all levels.
//
// You can un-comment the OnPlayerCommandText callback below to enable a simple
// teleport command (/lsb) that teleports you to the LS BeachSide building.
//
// Warning...
// This script uses a total of:
// * 30 objects = 1 for the elevator, 2 for the elevator doors, 26 for the elevator
// floor doors and 1 for the building (replacement LS BeachSide building)
// * 14 3D Text Labels = 13 on the floors and 1 in the elevator
// * 1 dialog (for the elevator)
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------


// -----------------------------------------------------------------------------
// Includes
// --------

// SA-MP include
#include <a_samp>

// For PlaySoundForPlayersInRange()
#include "../include/gl_common.inc"

// -----------------------------------------------------------------------------
// Defines
// -------

// Movement speed of the elevator
#define ELEVATOR_SPEED (5.0)

// Movement speed of the doors
#define DOORS_SPEED (5.0)

// 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 ELEVATOR_WAIT_TIME (5000)

// Dialog ID for the LS BeachSide elevator dialog
#define DIALOG_ID (877)

// Position defines
#define X_DOOR_R_OPENED (289.542419)
#define X_DOOR_L_OPENED (286.342407)
#define Y_DOOR_R_OPENED (-1609.640991)
#define Y_DOOR_L_OPENED (-1609.076049)

#define X_FDOOR_R_OPENED (289.492431)
#define X_FDOOR_L_OPENED (286.292419)
#define Y_FDOOR_R_OPENED (-1609.870971)
#define Y_FDOOR_L_OPENED (-1609.306030)

#define GROUND_Z_COORD (33.825077)
#define X_ELEVATOR_POS (287.942413)
#define Y_ELEVATOR_POS (-1609.341064)

// Elevator state defines
#define ELEVATOR_STATE_IDLE (0)
#define ELEVATOR_STATE_WAITING (1)
#define ELEVATOR_STATE_MOVING (2)

// Invalid floor define
#define INVALID_FLOOR (-1)

// Used for chat text messages
#define COLOR_MESSAGE_YELLOW 0xFFDD00AA

// -----------------------------------------------------------------------------
// Constants
// ---------

// Elevator floor names for the 3D text labels
static FloorNames[13][] =
{
"Ground Floor",
"First Floor",
"Second Floor",
"Third Floor",
"Fourth Floor",
"Fifth Floor",
"Sixth Floor",
"Seventh Floor",
"Eighth Floor",
"Ninth Floor",
"Tenth Floor",
"Eleventh Floor",
"Twelfth Floor"
};

// Elevator floor Z heights
static Float:FloorZOffsets[13] =
{
0.0, // 0.0,
14.061004, // Distance from ground floor to 1st floor is more than all other floors
18.561004, // 14.061004 + (4.5 * 1.0)
23.061004, // 14.061004 + (4.5 * 2.0)
27.561004, // 14.061004 + (4.5 * 3.0)
32.061004, // 14.061004 + (4.5 * 4.0)
36.561004, // 14.061004 + (4.5 * 5.0)
41.061004, // 14.061004 + (4.5 * 1.0)
45.561004, // 14.061004 + (4.5 * 1.0)
50.061004, // 14.061004 + (4.5 * 8.0)
54.561004, // 14.061004 + (4.5 * 9.0)
59.061004, // 14.061004 + (4.5 * 10.0)
63.561004, // 14.061004 + (4.5 * 11.0)
};

// -----------------------------------------------------------------------------
// Variables
// ---------

// Stores the created object numbers of the replacement building and interior
// parts so they can be destroyed when the filterscript is unloaded
new LSBeachSide1Object;
new LSBeachSide1InteriorObject;

// Stores the created object numbers of the elevator, the elevator doors and
// the elevator floor doors so they can be destroyed when the filterscript
// is unloaded
new Obj_Elevator, Obj_ElevatorDoors[2], Obj_FloorDoors[13][2];

// Stores a reference to the 3D text labels used on each floor and inside the
// elevator itself so they can be detroyed when the filterscript is unloaded
new Text3D:Label_Elevator, Text3D:Label_Floors[13];

// Stores the current state of the elevator (ie ELEVATOR_STATE_IDLE,
// ELEVATOR_STATE_WAITING or ELEVATOR_STATE_MOVING)
new ElevatorState;

// Stores the current floor the elevator is on or heading to... if the value is
// ELEVATOR_STATE_IDLE or ELEVATOR_STATE_WAITING this is the current floor. If
// the value is ELEVATOR_STATE_MOVING then it is the floor it's moving to
new ElevatorFloor;

// Stores the elevator queue for each floor
new ElevatorQueue[13];

// Stores who requested the floor for the elevator queue...
// FloorRequestedBy[floor_id] = playerid; (stores who requested which floor)
new FloorRequestedBy[13];

// Used for a timer that makes the elevator move faster after players start
// surfing the object
new ElevatorBoostTimer;

// -----------------------------------------------------------------------------
// 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
// ---------

// Un-comment the OnPlayerCommandText callback below (remove the "/*" and the "*/")
// to enable a simple teleport command (/lsb) which teleports the player to
// outside the LS BeachSide building.

/*
public OnPlayerCommandText(playerid, cmdtext[])
{
// Check command text
if (strcmp("/lsb", cmdtext, true, 4) == 0)
{
// Set the interior
SetPlayerInterior(playerid, 0);

// Set player position and facing angle
SetPlayerPos(playerid, 289.81 + random(2), -1630.65 + random(2), 34.32);
SetPlayerFacingAngle(playerid, 10);

// Fix camera position after teleporting
SetCameraBehindPlayer(playerid);

// Send a gametext message to the player
GameTextForPlayer(playerid, "~b~~h~LS BeachSide!", 3000, 3);

// Exit here
return 1;
}

// Exit here (return 0 as the command was not handled in this filterscript)
return 0;
}
*/

public OnFilterScriptInit()
{
// Display information in the Server Console
print("\n");
print(" |---------------------------------------------------");
print(" |--- LS BeachSide Filterscript");
print(" |-- Script v1.01");
print(" |-- 12th January 2015");
print(" |---------------------------------------------------");

// Create the LS BeachSide Building object
LSBeachSide1Object = CreateObject(19596, 280.297, -1606.2, 72.3984, 0, 0, 0);

// Create the LS BeachSide Building interior object
LSBeachSide1InteriorObject = CreateObject(19597, 280.297, -1606.2, 72.3984, 0, 0, 0);

// Display information in the Server Console
print(" |-- LS BeachSide Building and Interior objects created");

// Reset the elevator queue
ResetElevatorQueue();

// Create the elevator object, the elevator doors and the floor doors
Elevator_Initialize();

// Display information in the Server Console
print(" |-- LS BeachSide Building Elevator created");
print(" |---------------------------------------------------");

// Loop
for (new i = 0; i < MAX_PLAYERS; i++)
{
// Check if the player is connected and not a NPC
if (IsPlayerConnected(i) && !IsPlayerNPC(i))
{
// Remove default GTASA BeachSide map objects and LOD
// (so any player currently ingame does not have to rejoin for them
// to be removed when this filterscript is loaded)
RemoveBuildingForPlayer(i, 6391, 280.297, -1606.2, 72.3984, 250.0); // Building
RemoveBuildingForPlayer(i, 6394, 280.297, -1606.2, 72.3984, 250.0); // LOD
RemoveBuildingForPlayer(i, 6518, 280.297, -1606.2, 72.3984, 250.0); // Night Lights
}
}

// Exit here
return 1;
}

public OnFilterScriptExit()
{
// Check for valid object
if (IsValidObject(LSBeachSide1Object))
{
// Destroy the LS BeachSide Building object
DestroyObject(LSBeachSide1Object);

// Display information in the Server Console
print(" |---------------------------------------------------");
print(" |-- LS BeachSide Building object destroyed");
}

// Check for valid object
if (IsValidObject(LSBeachSide1InteriorObject))
{
// Destroy the LS BeachSide Building interior object
DestroyObject(LSBeachSide1InteriorObject);

// Display information in the Server Console
print(" |---------------------------------------------------");
print(" |-- LS BeachSide Building Interior object destroyed");
}

// Destroy the elevator, the elevator doors and the elevator floor doors
Elevator_Destroy();

// Display information in the Server Console
print(" |-- LS BeachSide Building Elevator destroyed");
print(" |---------------------------------------------------");

// Exit here
return 1;
}

public OnPlayerConnect(playerid)
{
// Remove default GTASA BeachSide map objects and LOD
RemoveBuildingForPlayer(playerid, 6391, 280.297, -1606.2, 72.3984, 250.0); // Building
RemoveBuildingForPlayer(playerid, 6394, 280.297, -1606.2, 72.3984, 250.0); // LOD
RemoveBuildingForPlayer(playerid, 6518, 280.297, -1606.2, 72.3984, 250.0); // Night Lights

// Exit here
return 1;
}

public OnObjectMoved(objectid)
{
// Create variables
new Float:x, Float:y, Float:z;

// Loop
for(new i; i < sizeof(Obj_FloorDoors); i ++)
{
// Check if the object that moved was one of the elevator floor doors
if(objectid == Obj_FloorDoors[i][0])
{
GetObjectPos(Obj_FloorDoors[i][0], x, y, z);

// Some floor doors have shut, move the elevator to next floor in queue:
if (y < Y_DOOR_L_OPENED - 0.5)
{
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("{CCCCCC}Press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}' to use elevator", 0xCCCCCCAA, X_ELEVATOR_POS + 1.6, Y_ELEVATOR_POS - 1.85, z - 0.4, 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~The floor is already in the queue", 3500, 4);
else if(DidPlayerRequestElevator(playerid))
GameTextForPlayer(playerid, "~r~You already requested the elevator", 3500, 4);
else
CallElevator(playerid, listitem);

return 1;
}

return 0;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(!IsPlayerInAnyVehicle(playerid) && (newkeys & KEY_YES))
{
new Float:pos[3];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);

//printf("X = %0.2f | Y = %0.2f | Z = %0.2f", pos[0], pos[1], pos[2]);

// Check if the player is using the button inside the elevator
if(pos[1] > (Y_ELEVATOR_POS - 1.8) && pos[1] < (Y_ELEVATOR_POS + 1.8) && pos[0] < (X_ELEVATOR_POS + 1.8) && pos[0] > (X_ELEVATOR_POS - 1.8))
{
// Show the elevator dialog to the player
ShowElevatorDialog(playerid);
}
else
{
// Check if the player is using the button on one of the floors
if(pos[1] < (Y_ELEVATOR_POS - 1.81) && pos[1] > (Y_ELEVATOR_POS - 3.8) && pos[0] > (X_ELEVATOR_POS + 1.21) && pos[0] < (X_ELEVATOR_POS + 3.8))
{
// The player is most likely using an elevator floor button, check which floor

// Create variable (number of floors to check)
new i = 12;

// Loop
while(pos[2] < GetDoorsZCoordForFloor(i) + 3.5 && i > 0)
i --;

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

if (i <= 11)
{
// Check if the elevator is not moving (idle or waiting)
if (ElevatorState != ELEVATOR_STATE_MOVING)
{
// Check if the elevator is already on the floor it was called from
if (ElevatorFloor == i + 1)
{
// Display gametext message to the player
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~~h~LS BeachSide Elevator Is~n~~y~~h~Already On This Floor...~n~~w~Walk Inside It~n~~w~And Press '~k~~CONVERSATION_YES~'", 3500, 3);

// Display chat text message to the player and exit here
SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, "* The LS BeachSide elevator is already on this floor... walk inside it and press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}'");
return 1;
}
}

// Call function to call the elevator to the floor
CallElevator(playerid, i + 1);

// Display gametext message to the player
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~g~~h~LS BeachSide Elevator~n~~g~~h~Has Been Called...~n~~w~Please Wait", 3000, 3);

// Create variable for formatted message
new strTempString[100];

// Check if the elevator is moving
if (ElevatorState == ELEVATOR_STATE_MOVING)
{
// Format chat text message
format(strTempString, sizeof(strTempString), "* The LS BeachSide elevator has been called... it is currently moving towards the %s.", FloorNames[ElevatorFloor]);
}
else
{
// Format chat text message
format(strTempString, sizeof(strTempString), "* The LS BeachSide elevator has been called... it is currently on the %s.", FloorNames[ElevatorFloor]);
}

// Display formatted chat text message to the player
SendClientMessage(playerid, COLOR_MESSAGE_YELLOW, strTempString);

// Exit here
return 1;
}
}
}
}

return 1;
}

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

Obj_Elevator = CreateObject(18755, X_ELEVATOR_POS, Y_ELEVATOR_POS, GROUND_Z_COORD, 0.000000, 0.000000, 80.000000);
Obj_ElevatorDoors[0] = CreateObject(18757, X_ELEVATOR_POS, Y_ELEVATOR_POS, GROUND_Z_COORD, 0.000000, 0.000000, 80.000000);
Obj_ElevatorDoors[1] = CreateObject(18756, X_ELEVATOR_POS, Y_ELEVATOR_POS, GROUND_Z_COORD, 0.000000, 0.000000, 80.000000);

Label_Elevator = Create3DTextLabel("{CCCCCC}Press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}' to use elevator", 0xCCCCCCAA, X_ELEVATOR_POS + 1.6, Y_ELEVATOR_POS - 1.85, GROUND_Z_COORD - 0.4, 4.0, 0, 1);

new string[128],
Float:z;

for(new i; i < sizeof(Obj_FloorDoors); i ++)
{
Obj_FloorDoors[i][0] = CreateObject(18757, X_ELEVATOR_POS, Y_ELEVATOR_POS - 0.245, GetDoorsZCoordForFloor(i) + 0.05, 0.000000, 0.000000, 80.000000);
Obj_FloorDoors[i][1] = CreateObject(18756, X_ELEVATOR_POS, Y_ELEVATOR_POS - 0.245, GetDoorsZCoordForFloor(i) + 0.05, 0.000000, 0.000000, 80.000000);

format(string, sizeof(string), "{CCCCCC}[%s]\n{CCCCCC}Press '{FFFFFF}~k~~CONVERSATION_YES~{CCCCCC}' to call", FloorNames[i]);

// Calculate label Z position
if (i == 0)
{
z = GROUND_Z_COORD;
}
else if (i == 1)
{
z = GROUND_Z_COORD + 14.061004;
}
else
{
z = GROUND_Z_COORD + 14.061004 + ((i - 1) * 4.5);
}

Label_Floors[i] = Create3DTextLabel(string, 0xCCCCCCAA, X_ELEVATOR_POS + 2, Y_ELEVATOR_POS -3, z - 0.2, 10.5, 0, 1);
}

// 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_DOOR_L_OPENED, z, DOORS_SPEED);
MoveObject(Obj_ElevatorDoors[1], X_DOOR_R_OPENED, Y_DOOR_R_OPENED, 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_ELEVATOR_POS, Y_ELEVATOR_POS, z, DOORS_SPEED);
MoveObject(Obj_ElevatorDoors[1], X_ELEVATOR_POS, Y_ELEVATOR_POS, z, DOORS_SPEED);

return 1;
}

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

MoveObject(Obj_FloorDoors[floorid][0], X_FDOOR_L_OPENED, Y_FDOOR_L_OPENED, GetDoorsZCoordForFloor(floorid) + 0.05, DOORS_SPEED);
MoveObject(Obj_FloorDoors[floorid][1], X_FDOOR_R_OPENED, Y_FDOOR_R_OPENED, GetDoorsZCoordForFloor(floorid) + 0.05, DOORS_SPEED);

PlaySoundForPlayersInRange(6401, 50.0, X_ELEVATOR_POS, Y_ELEVATOR_POS, GetDoorsZCoordForFloor(floorid) + 5.0);

return 1;
}

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

MoveObject(Obj_FloorDoors[floorid][0], X_ELEVATOR_POS, Y_ELEVATOR_POS - 0.245, GetDoorsZCoordForFloor(floorid) + 0.05, DOORS_SPEED);
MoveObject(Obj_FloorDoors[floorid][1], X_ELEVATOR_POS, Y_ELEVATOR_POS - 0.245, GetDoorsZCoordForFloor(floorid) + 0.05, DOORS_SPEED);

PlaySoundForPlayersInRange(6401, 50.0, X_ELEVATOR_POS, Y_ELEVATOR_POS, GetDoorsZCoordForFloor(floorid) + 5.0);

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, X_ELEVATOR_POS, Y_ELEVATOR_POS, GetElevatorZCoordForFloor(floorid), 0.25);
MoveObject(Obj_ElevatorDoors[0], X_ELEVATOR_POS, Y_ELEVATOR_POS, GetDoorsZCoordForFloor(floorid), 0.25);
MoveObject(Obj_ElevatorDoors[1], X_ELEVATOR_POS, Y_ELEVATOR_POS, GetDoorsZCoordForFloor(floorid), 0.25);
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'
StopObject(Obj_Elevator);
StopObject(Obj_ElevatorDoors[0]);
StopObject(Obj_ElevatorDoors[1]);

MoveObject(Obj_Elevator, X_ELEVATOR_POS, Y_ELEVATOR_POS, GetElevatorZCoordForFloor(floorid), ELEVATOR_SPEED);
MoveObject(Obj_ElevatorDoors[0], X_ELEVATOR_POS, Y_ELEVATOR_POS, GetDoorsZCoordForFloor(floorid), ELEVATOR_SPEED);
MoveObject(Obj_ElevatorDoors[1], X_ELEVATOR_POS, Y_ELEVATOR_POS, 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, "LS BeachSide Elevator...", string, "Accept", "Cancel");

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]);

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


EDIT: It appears that RC2 does contain the filerscripts if you download the windows package. My bad.

Kind Regards,
Sledgehammer.

ilepopivanov
24/03/2015, 06:08 PM
http://prntscr.com/6ku8va but this objects ??? :/

I found ls_beachside but I want objects in interior :/ not only building

Alex Magaņa
24/03/2015, 06:30 PM
http://prntscr.com/6ku8va but this objects ??? :/

I found ls_beachside but I want objects in interior :/ not only building

You need to map the ls_beachside with SA-MP Objects! There's no interior with objects ^_^.

Matite
25/03/2015, 11:52 PM
The filterscripts are not in the Linux server package.

They are in the Windows server package as that is where you probably do your dev work anyway. Make sure you use the LS BeachSide filterscript from the RC2 or RC3 package as I made some edits for the underground car park.

We did not supply any of the new buildings mapped with objects... it is up to you to add your own objects (except for the Dillimore Gas Station which comes with the objects made by R*).

ilepopivanov
26/03/2015, 04:09 PM
Ok thanks :( ( I will be happy if you send me interior with objects :D )

EDIT: Is possible to install 2 samp versions on 1 pc?. I installed GTA in D:Gta San Andreas and in D:SAMP 0.3.7 \ GTA San ANdreas

When I install samp in 0.3.7/GTA San Andreas and when I connect I connected succsesfully and when I join in 0.3z server with 0.3z samp version from D:Gta San Andreas I can't connect to server :o. Samp 0.3.7 started..

Is it possible? I think it's not.

Sry for bad english