Hi I need help. I want to create 3d label, then if ill press ENTER near the 3d label, ill be teleported to interior. But ill need entrance from interior (to back...).
I hope you understood. Somebody can do this for me please?
pawn Код:
//On the top of your script
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
//Under OnGameModeInit
Create3DTextLabel("Enter!",0x008080FF,Xpos,Ypos,Zpos,30,0,1); //Insert the X-, Y- and Zpos of the entrance here
Create3DTextLabel("Exit!",0x008080FF,Xpos,Ypos,Zpos,30,0,1); //Insert the X-, Y- and Zpos of the exit here
//Under OnPlayerKeyStateChange
if(PRESSED(16))
{
if(IsPlayerInRangeOfPoint(playerid,5,Xpos,Ypos,Zpos)) //Insert the X-, Y- and Zpos of the entrance here
{
SetPlayerPos(playerid,Xpos,Ypos,Zpos); //Insert the X-, Y- and Zpos of the exit here
SetPlayerInterior(playerid,Int); //Insert the Interior of the exit here
}
if(IsPlayerInRangeOfPoint(playerid,5,Xpos,Ypos,Zpos)) //Insert the X-, Y- and Zpos of the exit here
{
SetPlayerPos(playerid,Xpos,Ypos,Zpos); //Insert the X-, Y- and Zpos of the entrance here
SetPlayerInterior(playerid,Int); //Insert the Interior of the entrance here
}
}