SA-MP Forums Archive
getplayerkeys updown does not work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: getplayerkeys updown does not work (/showthread.php?tid=260944)



getplayerkeys updown does not work - Donya - 11.06.2011

when i click left or right its ok, if up or down, no message gets sent;
pawn Код:
static keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if(lr > 0)
        {
            PlayerInfo[playerid][pInvisibilityTick] = GetTickCount();
            SendClientMessage(playerid, -1, "Pressing Right");
        }
        else if(lr < 0)
        {
            SendClientMessage(playerid, -1, "Pressing Left");
        }
        if(ud < 0)
        {
            SendClientMessage(playerid, -1, "Pressing Up");
        }
        else if(ud > 0)
        {
            SendClientMessage(playerid, -1, "Pressing Down");
        }



Re: getplayerkeys updown does not work - Mauzen - 11.06.2011

Are you in a vehicle or on foot when pressing?
The up down keys are not wasd, but the arrow keys when you are in a car. Unfortuanetly you cant get the wasd keys there.


Re: getplayerkeys updown does not work - Donya - 11.06.2011

in vehicle, yes i actually want them to be arrow keys.

left and right works .. but accelerate and brake doesn't (using arrow keys)