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


Messages In This Thread
One last mother-.. problem! - by Peter Alex - 22.07.2012, 21:49
Re: One last mother-.. problem! - by Peter Alex - 22.07.2012, 21:57
Re: One last mother-.. problem! - by Virtual1ty - 22.07.2012, 22:06
Re: One last mother-.. problem! - by ReneG - 22.07.2012, 22:08
Re: One last mother-.. problem! - by Peter Alex - 22.07.2012, 22:10
Re: One last mother-.. problem! - by ReneG - 22.07.2012, 22:33

Forum Jump:


Users browsing this thread: 3 Guest(s)