Entering Interiors with buttons rather /enter
#6

Quote:
Originally Posted by Calabresi
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT))
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, DoorposX, DoorposY, DoorposZ) // Door exterior position here.
        {
            SetPlayerPos(playerid, CoordX, CoordY, CoordZ); // Teleport coordinates here.
            SetPlayerInterior(playerid, Interior); // Interior ID.
            SetPlayerVirtualWorld(playerid, VirtualWorld); // Virtual World.
            return 1;
        }
    }
}
Basically, that's it. You gotta write door coordinates and the coordinates you want to teleport people to and it's ready.
When i use that code, are automatically using SPACE or not ?
Reply


Messages In This Thread
Entering Interiors with buttons rather /enter - by DrTeDDyBeAr - 24.08.2012, 16:24
Re: Entering Interiors with buttons rather /enter - by Shetch - 24.08.2012, 16:25
Re: Entering Interiors with buttons rather /enter - by Calabresi - 24.08.2012, 16:31
Re: Entering Interiors with buttons rather /enter - by Memoryz - 24.08.2012, 16:33
Re: Entering Interiors with buttons rather /enter - by DrTeDDyBeAr - 24.08.2012, 16:34
Re: Entering Interiors with buttons rather /enter - by botak - 25.12.2013, 01:52

Forum Jump:


Users browsing this thread: 2 Guest(s)