Can't press enter to enter in a building
#1

I try to make a system where when you press the "enter" key in a certain area you will be teleported inside. I made the code, but something is not right, because when I press enter at that location, nothing happens.
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(IsPlayerInRangeOfPoint(playerid, 10, 1219.9609,-1811.9579,16.5938))
	{
		if(newkeys == KEY_SECONDARY_ATTACK)
		{
    		if(GetPlayerInterior(playerid)==0 && GetPlayerVirtualWorld(playerid)==0)
    		{
         		SetPlayerInterior(playerid,3);
         		SetPlayerPos(playerid, 1494.325195,1304.942871,1093.289062);
    		}
		}
	}
	return 1;
}
Reply


Messages In This Thread
Can't press enter to enter in a building - by Xored - 25.01.2020, 13:13
Re: Can't press enter to enter in a building - by SiaReyes - 25.01.2020, 13:21
Re: Can't press enter to enter in a building - by Xored - 25.01.2020, 13:28
Re: Can't press enter to enter in a building - by Markski - 25.01.2020, 14:07

Forum Jump:


Users browsing this thread: 1 Guest(s)