SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 21/05/2019, 07:16 AM   #1
sergioduran11
Little Clucker
 
sergioduran11's Avatar
 
Join Date: Jan 2018
Posts: 21
Reputation: 0
Default Keys samp

Hi, samp comunity, I need help for this code, I want make that this function work only with the Key 2, but when I used the system in the server, already compiled, only worked with Keys 2+E, someone can help me?
Thanks.



Code:
FIXED...

Last edited by sergioduran11; 22/05/2019 at 01:05 AM.
sergioduran11 is offline   Reply With Quote
Old 21/05/2019, 07:12 PM   #2
austin070
Huge Clucker
 
austin070's Avatar
 
Join Date: Aug 2010
Posts: 374
Reputation: 18
Default Re: Keys samp

Have you checked your game settings to see what your binding is for that key?
austin070 is offline   Reply With Quote
Old 21/05/2019, 07:43 PM   #3
sergioduran11
Little Clucker
 
sergioduran11's Avatar
 
Join Date: Jan 2018
Posts: 21
Reputation: 0
Default Re: Keys samp

Yes, other functions with the Key 2 work normally
sergioduran11 is offline   Reply With Quote
Old 21/05/2019, 08:13 PM   #4
austin070
Huge Clucker
 
austin070's Avatar
 
Join Date: Aug 2010
Posts: 374
Reputation: 18
Default Re: Keys samp

Try this where you check for a key:

pawn Code:
((newkeys & KEY_LOOK_BEHIND) && !(oldkeys & KEY_LOOK_BEHIND))
austin070 is offline   Reply With Quote
Old 22/05/2019, 12:22 AM   #5
sergioduran11
Little Clucker
 
sergioduran11's Avatar
 
Join Date: Jan 2018
Posts: 21
Reputation: 0
Default Re: Keys samp

The same, only work pressing E + 2
sergioduran11 is offline   Reply With Quote
Old 22/05/2019, 01:03 AM   #6
sergioduran11
Little Clucker
 
sergioduran11's Avatar
 
Join Date: Jan 2018
Posts: 21
Reputation: 0
Default Re: Keys samp

I have fixed, i have changed if(newkeys & KEY_LOOK_BEHIND) to if(newkeys == KEY_LOOK_BEHIND)

Thanks

I don't know how can i give you +1
sergioduran11 is offline   Reply With Quote
Reply

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
Key detectors other than predefined keys in samp -=Dar[K]Lord=- Scripting Help 6 11/10/2013 02:58 PM
SAMP keys question UnAngel Scripting Help 6 01/02/2013 09:06 AM
SAMP keys question LetsOWN[PL] Scripting Help 5 01/11/2012 01:55 PM
[AJUDA] Keys Samp ForKill PortuguÍs/Portuguese 4 25/12/2011 05:52 PM
What keys are detectable by SAMP? James.Clement General 2 12/12/2011 04:27 PM


All times are GMT. The time now is 12:20 AM.


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