[Solved] Clickable TextDraw
#1

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
Reply
#2

It's not possible to do that. Maybe in 0.3b.

You can find key press's on the wiki
Reply
#3

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?
Reply
#4

Try something like if oldkeys == key_here and newkeys == key_here.
Reply
#5

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.

pawn Code:
if(keys & KEY_JUMP) { ..
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
Reply
#6

what is or is there a fuction to enable the mouse?
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)