SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 10/06/2009, 05:40 PM   #1
carlos-
Little Clucker
 
Join Date: May 2009
Posts: 7
Reputation: 0
Default If user press key X...

How can do this?

public OnPressKey(playerid,key)
{
if(key = F11)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DAN CE1);
}elseif(key = Left Shift OR key = Q)
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DAN CE2);
Others acionts = NULL
}
return 1;
}

Sorry for my english
carlos- is offline  
Old 10/06/2009, 05:41 PM   #2
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Location: Slovenia
Posts: 6,340
Reputation: 365
Default Re: If user press key X...

You can't detect F11 key in SA-MP.
Here is list of available keys: http://wiki.sa-mp.com/wiki/GetPlayerKeys#Key_List
Correlli is offline  
Old 21/07/2009, 11:11 PM   #3
Annihalation
Big Clucker
 
Join Date: Jul 2009
Posts: 70
Reputation: 0
Default Re: If user press key X...

could you perhaps define it? like find the value of the <x> key and do a

#define KEY_X

that would be cool, someone smarter than me please help
Annihalation is offline  
Old 21/07/2009, 11:16 PM   #4
James_Alex
Gangsta
 
Join Date: Dec 2008
Posts: 570
Reputation: 0
Default Re: If user press key X...

Quote:
Originally Posted by Annihalation
could you perhaps define it? like find the value of the <x> key and do a

#define KEY_X

that would be cool, someone smarter than me please help
no, i think it's impossible
but you can change the function of Key X in your GTA SA to action for example !!
James_Alex is offline  
Old 21/07/2009, 11:18 PM   #5
Annihalation
Big Clucker
 
Join Date: Jul 2009
Posts: 70
Reputation: 0
Default Re: If user press key X...

you mean in the Options of GTA change the fire button to X :P
Annihalation is offline  
Old 21/07/2009, 11:27 PM   #6
James_Alex
Gangsta
 
Join Date: Dec 2008
Posts: 570
Reputation: 0
Default Re: If user press key X...

exactly
James_Alex is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GTA won't start when I press Connect IniX Client Support 19 02/02/2015 06:00 PM
Force a player to press a key? Remba Help Archive 5 12/05/2010 01:50 PM
How to make a player press a key? Torran Help Archive 0 15/03/2010 06:25 PM
Key Press deather Help Archive 1 11/02/2010 03:31 PM
Press ALT And Add to jail BLACK-RIDER-1692 Help Archive 7 28/08/2009 10:19 AM


All times are GMT. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.