11.12.2012, 12:15
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if ((oldkeys & KEY_SECONDARY_ATTACK) && !(newkeys & KEY_SECONDARY_ATTACK)){//If the player presses enter button if(IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z)) //Change X, Y and Z to the position of your desired 'enter position' { SetPlayerVirtualWorld(playerid, 1); //change 1 to whatever you like SetPlayerInterior(playerid, <interior number>); //change <inter.. to the interior number SetPlayerPos(playerid, X, Y, Z); //Change xyz to the interior position SendClientMessage(playerid,0xFFFFFFFF,"You have entered the house!"); } } return 1; }