Pressing an letter/key then execute something ??????
#1

Is it possible that if i press LETTER / KEY / NUMBERS . Then it will execute something i want ?

For example i pressed "y" then it will tp me to something i want.
Reply
#2

Yes.
Reply
#3

Yes it is possible, but only with certain keys, you can find the available keys here: https://sampwiki.blast.hk/wiki/Keys

Best regards,
Jesse
Reply
#4

So whats the code guys ?
Reply
#5

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply
#6

PHP код:
#define PRESSED(%0) \
    
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if (
PRESSED(KEY_YES))
    {
        
// do something
    
}
    return 
1;

Reply
#7

Thank you alot Azula and Jayden

Also at jessejanssen for the list of keys

+REP TO ALL OF YOU
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)