[Solved] Clickable TextDraw - 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: [Solved] Clickable TextDraw (
/showthread.php?tid=105163)
[Solved] Clickable TextDraw -
troy52192 - 28.10.2009
is it seem possible if i try for example click on a textdraw and it will do a function? if not what r can i find some key strings? dont think im no newbie ive been scripting for over a year since july of 2008
Re: Clickable TextDraw -
Jasen - 28.10.2009
It's not possible to do that. Maybe in 0.3b.
You can find key press's on the wiki
Re: Clickable TextDraw -
troy52192 - 28.10.2009
r u able to press 2 keys at once all i see is the single key concept heres and example of a key string
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
if (PRESSED(KEY_FIRE)){
new
vehicleid = GetPlayerVehicleID(playerid);
if (vehicleid){
AddVehicleComponent(vehicleid, 1010);}}
return 1;}
how i would make this into a 2 string concept?
Re: Clickable TextDraw -
Jasen - 28.10.2009
Try something like if oldkeys == key_here and newkeys == key_here.
Re: Clickable TextDraw -
Dirty_bum - 28.10.2009
Quote:
Originally Posted by Kye
The keys are a set of bits. Multiple keys/buttons can be pressed at the same time. So rather than using == or - you should use bitwise &.
pawn Code:
if(keys == KEY_JUMP) { ..
That detects if only the jump key is pressed and no other keys. For example, that condition would be false if the player pressed both KEY_SPRINT and KEY_JUMP at the same time.
That detects if the KEY_JUMP key is pressed in combination with any other key.
pawn Code:
IsKeyJustDown(key, newkeys, oldkeys) { if((newkeys & key) && !(oldkeys & key)) return 1; return 0; }
|
Hope that helps for 2 Keys at once thingy
Re: Clickable TextDraw -
troy52192 - 28.10.2009
what is or is there a fuction to enable the mouse?
Re: Clickable TextDraw -
Jasen - 28.10.2009
No there is'nt a function to enable the mouse. The mouse automaticly enables when your in the scoreboard(tab), character selection and viewing a dialog or if the chat box is open.