05.09.2010, 16:17
I'm trying to detect the directional keys and can not.
I read something about my OS is windows vista but nothing concrete, then I wonder what is happening.
I made debug, and when press the diretional keys, nothing happens, while the others wwere send via client message.
I read something about my OS is windows vista but nothing concrete, then I wonder what is happening.
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
new string[20];
format(string,20,"KEY: %d OLDKEY: %d",newkeys,oldkeys);
SendClientMessage(playerid,Sistema,string);
if(newkeys & KEY_RIGHT)
{
if(GetPlayerSelState(playerid) > 0)
SetPlayerSelectionID(playerid,GetPlayerSelectionID(playerid)+1);
else
return 1;
}
if(newkeys & KEY_LEFT)
{
if(GetPlayerSelState(playerid) > 0)
SetPlayerSelectionID(playerid,GetPlayerSelectionID(playerid)-1);
else
return 1;
}
return 1;
}