Detecting if a player pressed SPACE - 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)
+--- Thread: Detecting if a player pressed SPACE (
/showthread.php?tid=491205)
Detecting if a player pressed SPACE -
Phil_Cutcliffe - 29.01.2014
I have this code for when my player enters a pickup for any menus that display. The only problem is when pressing the SPACE key it removes the menu and still has the player frozen and unable to move. So I set it to unfreeze the player after pressing what I thought was the SPACE key. This has not worked. Any ideas how to detect when the SPACE key is being pressed on foot?
pawn Код:
if (newkeys & KEY_HANDBRAKE)
{
if(Pickup[playerid] == 1)
{
TogglePlayerControllable(playerid, 1);
SetTimerEx("PickupTimer", 3000, false, "i", playerid);
}
}
if (newkeys & KEY_SECONDARY_ATTACK)
{
if(Pickup[playerid] == 1)
{
SetTimerEx("PickupTimer", 3000, false, "i", playerid);
}
Re: Detecting if a player pressed SPACE -
Phil_Cutcliffe - 29.01.2014
[SOLVED] Brainfart lol