30.07.2011, 16:17
When player presses F / ENTER, I think, take this and learn more.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK)) {
if(IsPlayerInRangeOfPoint(playerid, 2.5, X, Y, Z)) { // You need to change X, Y, Z to the entrance..
// Here you teleports the player to the specific location with interior ID.
return 1;
}
}
return 1;
}