24.08.2012, 16:31
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;
}
}
}