22.08.2011, 20:50
Hello everyone,
I have quite a big problem, but I dont know how to solve it. Currently I have a menu (out of textdraws) when connecting, where you have to select whether you want to login/register, forgot password or change your name.
I wanted this menu to be used with arrow keys (key_up & key_down), but when I press them nothing happens.
I hope you can help me.
Regards
Padarom
I have quite a big problem, but I dont know how to solve it. Currently I have a menu (out of textdraws) when connecting, where you have to select whether you want to login/register, forgot password or change your name.
I wanted this menu to be used with arrow keys (key_up & key_down), but when I press them nothing happens.
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (Menu[playerid] != 0) { if ((newkeys & (KEY_UP)) == (KEY_UP)) { if (Menu[playerid] == 1) { Menu[playerid] = 2; TextDrawSetOutline(Welcomesz, 1); TextDrawSetOutline(Welcomese, 0); } if (Menu[playerid] == 2) { Menu[playerid] = 3; TextDrawSetOutline(Welcomesd, 1); TextDrawSetOutline(Welcomesz, 0); } } if ((newkeys & (KEY_DOWN)) == (KEY_DOWN)) { if (Menu[playerid] == 3) { Menu[playerid] = 2; TextDrawSetOutline(Welcomesz, 1); TextDrawSetOutline(Welcomesd, 0); } if (Menu[playerid] == 2) { Menu[playerid] = 1; TextDrawSetOutline(Welcomese, 1); TextDrawSetOutline(Welcomesz, 0); } } } return 1; }
Regards
Padarom