How to make /enter into a physical key command?
#1

Hello, I want to use the "Enter" key to enter into a building, but it doesn't work, no errors, just not functioning
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED( KEY_SECONDARY_ATTACK ))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, 1627.1270,-2248.2031,13.5049))
        {
        	SetPlayerPos(playerid, 246.783996,63.900199,1003.640625);
        	SetPlayerInterior(playerid, 6);
		}
    }
	return 1;
}
Reply
#2

use wiki regarding to playerkeystate there you will find info regarding to keys
Reply
#3

I have done that, Im just having a problem getting it to work
Reply
#4

Show us the 'PRESSED' code, please.
Reply
#5

Just using.... if(newkeys & KEY_SECONDARY_ATTACK) would work fine but I wouldn't use IsPlayerInRangeOfPoint() if you plan on using a lot of teleport points.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)