One last mother-.. problem!
#1

Basically what I've tried to do is map an interior inside a building. However, if I enter inside the interior, the collision forces of that building would force me out, so I had to remove it everytime I /enter the building and add it back everytime I /exit the building. The problem is : When 2 or more players are inside (the building is removed ), and one of them types /exit, the building appears back for EVERYONE and so the guys that are inside the building are forced out through the ground, due to the collisions.
How can I make it so that the building appears back only for the person that types the /exit command?
Here is the code:

Код:
COMMAND:enter(playerid, params[])
{
    if (IsPlayerInRangeOfPoint(playerid, 1.0, 172.66, -152.10, 1.72)) // checks if in range of the /enter point
    {
        RemoveBuildingForPlayer(playerid, 13200, 158.3594, -176.3047, 5.5703, 0.25);
        RemoveBuildingForPlayer(playerid, 12923, 158.3594, -176.3047, 5.5703, 0.25);
        SetPlayerPos(playerid, 170.75, -153.94, 1.81); // Sets their new position
    }
    return 1;
}
COMMAND:exit(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 1.0, 170.85, -153.85, 1.48)) // Checks if near the exit door
    {
           	RemoveObjectVar2 = CreateObject(12923, 158.3594, -176.3047, 5.5703, 0, 0, 0, 300);
           	SetPlayerPos(playerid, 172.24, -152.26, 1.81);
    }
    return 1;
}
And here are two pictures to understand what I've done:

Reply
#2

One note: There are no warning messages, in case that helps.
Reply
#3

Put it on a Streamer, or use CreatePlayerObject()!
The streamer relies on that very technique.
Reply
#4

EDIT: ^^ Yes, use player objects, but I will suggest this.

Since the player can only look out the window, why not just map that tiny area that they can see a couple thousand feet above the map, and teleport them when they enter? The only pitfall is that players won't be able to see other players outside the window.

Either way, the GTASA interior system wasn't really designed for looking into the outside world while inside a building.

The only interior they did this for was the LS Atrium, Rockstar developers only put in a part of the outside that the player could see.
Reply
#5

Quote:
Originally Posted by Virtual1ty
Посмотреть сообщение
Put it on a Streamer, or use CreatePlayerObject()!
The streamer relies on that very technique.
Thanks

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
EDIT: ^^ Yes, use player objects, but I will suggest this.

Since the player can only look out the window, why not just map that tiny area that they can see a couple thousand feet above the map, and teleport them when they enter? The only pitfall is that players won't be able to see other players outside the window.

Either way, the GTASA interior system wasn't really designed for looking into the outside world while inside a building.

The only interior they did this for was the LS Atrium, Rockstar developers only put in a part of the outside that the player could see.
That's the whole point, I want to make it possible to view from inside to outside in real time, even if the game wasn't designed for it - everything's possible.
Reply
#6

This is easy to accomplish with a bit more scripting. I sent you a PM with a tested/commented/hopefully working script using player objects regarding this. I grabbed the tele co-ords from the map editor, so they're not 100 percent accurate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)