Key mapping in scripted form
#1

i was doing re-search in the wiki forum normaly it was explained in chart form i dont have no idea how to script a fs to do key-mapping.

example when i press 2 i want to repair my car or lock/unlock it
Reply
#2

Read this: https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange !
There is the callback! And here are all the keys you can use: https://sampwiki.blast.hk/wiki/Keys
Reply
#3

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_FIRE) {
        //change KEY_FIRE to the desired key —  https://sampwiki.blast.hk/wiki/Keys
        //Code to perform if they is pressed.  
    }
    return 1;
}
Something like this is what you should be looking for (I didn't compile it, but it should be working). I suggest you read through Kraeror's first link though.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)