30.07.2011, 14:53
How to make a teleport with button? For example: Going to 3D text "Click or CTRL example SCROLL, to enter" and you teleport inside the building
Sorry for my bad english
Sorry for my bad english
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;
}
SetPlayerInterior(playerid, ID) // Set up Interior ID !
SetPlayerPos(playerid, x, y, z); // You need to change x, y, z !