OnPlayerKeystateChange
#1

Код:
    if (PRESSED(KEY_CTRL_BACK))
	{
     if(!IsPlayerInRangeOfPoint(playerid,5,-154.9131,2397.8865,42.5259)) return
     ShowPlayerDialog(playerid,DIALOG_SHOP,DIALOG_STYLE_LIST,"Madness","Dialog does the stuff","Select", "Back");
	}
	return 1;
}
I use this and it works everywhere,doesn't matter if I am near the coords or not.
Reply
#2

It will work anywhere BUT near the coords, because that's simply what you scripted. If the player is NOT (notice the exclamation mark) in range of the point, then show the dialog.
Reply
#3

if (PRESSED(KEY_CTRL_BACK))
{
if(IsPlayerInRangeOfPoint(playerid,5,-154.9131,2397.8865,42.5259)) return
ShowPlayerDialog(playerid,DIALOG_SHOP,DIALOG_STYLE _LIST,"Madness","Dialog does the stuff","Select", "Back");
}
return 1;
}

So it must be like this? But this doesn't work too.
Reply
#4

Try:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_CTRL_BACK)
    {
        if(IsPlayerInRangeOfPoint(playerid,5,-154.9131,2397.8865,42.5259))
        {
            ShowPlayerDialog(playerid,DIALOG_SHOP,DIALOG_STYLE_LIST,"Madness","Dialog does the stuff","Select", "Back");
        }
    }
    return 1;
}
Reply
#5

Doesn't work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)