SA-MP Forums Archive
Textdraw. Halp again lol. - 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: Textdraw. Halp again lol. (/showthread.php?tid=563976)



Textdraw. Halp again lol. - Ritzy2K - 18.02.2015

Actually...dont go on the topic...its just a doubt... in some server the textdraw can be opened through commands and below its written like press LMB to close this box...and as soon as the player enters a vehicle..it says press caps lock to close this box...how do i hide textdraws on pressing lmb and capslock...i think it isnt inbuilt in SA:MP but most of server uses same keys. is it some include?


Re: Textdraw. Halp again lol. - CalvinC - 18.02.2015

Use OnPlayerKeyStateChange.
List of keys: https://sampwiki.blast.hk/wiki/Keys

Example:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys & KEY_CROUCH) && !(oldkeys & KEY_CROUCH) || (newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE)) TextDrawHideForPlayer(playerid, TextDrawName);
    return 1;
}