Key state not working - 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: Key state not working (
/showthread.php?tid=598839)
Key state not working -
Arshman - 17.01.2016
Hey guys i have encountered a problem and cant get rid of it.
This is my code and The Fire key does not Hide the textdraw
Код:
if(newkeys == KEY_FIRE)
{
REFILLBOX[playerid] = 0;
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw7);
return 1;
}
Re: Key state not working -
Arshman - 17.01.2016
Anyone?
Re: Key state not working -
Arshman - 17.01.2016
Come on
Re: Key state not working -
d1git - 17.01.2016
PHP код:
// PRESSED(keys)
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
PHP код:
if(PRESSED(KEY_FIRE))
{
REFILLBOX[playerid] = 0;
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw4);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw7);
return 1;
}