10.07.2013, 12:12
Hello, what I want to do is, if player is near object and pressed ENTER there dialog will show to the player.
But when I pressed enter it fastly opens the dialog, and when I released enter it close the dialog, how can I do it when I will press enter dialog won't disappear ?
+How can I put this thing in quote thingy it's something like [pawno] [/pawno] ? or what ever it is :P
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInRangeOfPoint(playerid,0.7,1581.500000 0,-1708.8000488,3619.1999512) && (PRESSED(KEY_SECONDARY_ATTACK)))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Which jail cell door do you want to open?", "Jail cell door 1\nJail cell door 2\nJail cell door 3", "Open", "Cancel");
}
return 1;
}
Thank you for help in advance =)
But when I pressed enter it fastly opens the dialog, and when I released enter it close the dialog, how can I do it when I will press enter dialog won't disappear ?
+How can I put this thing in quote thingy it's something like [pawno] [/pawno] ? or what ever it is :P
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInRangeOfPoint(playerid,0.7,1581.500000 0,-1708.8000488,3619.1999512) && (PRESSED(KEY_SECONDARY_ATTACK)))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Which jail cell door do you want to open?", "Jail cell door 1\nJail cell door 2\nJail cell door 3", "Open", "Cancel");
}
return 1;
}
Thank you for help in advance =)