[HELP]Key codes?
#1

I'd like to know what are the codes for numbers on keyboard that are above letters. I need numbers from 1 to 8 and letters' O and B codes. IF anyone can point me to a web with something like that or say instantly please do. I am making a CS-Imitation

edit:

i've found something but it's way not the way I saw it in SA-MP:
Reply
#2

you can't, look in a_samp.inc for possible key states
Reply
#3

Quote:
Originally Posted by [ЯЈ®†
$!7ЈС©!Х™ ]
you can't, look in a_samp.inc for possible key states
a_samp.inc doesn't have ALL keys... IT has sprint, jump, crouch arrow keys, a few else. but I need exactly 1,2,3,4,5,6,7,8,o,b. valuse. I've found osmething but it's not the way in a_samp.inc
Reply
#4

You can't detect all button presses, instead you can detect the SA keys, such as sprint, movement, jump, etc. Many people have asked to be able to detect other non-SA keys, but it is currently impossible.

~Cueball~
Reply
#5

BUT IT ISS!!!! I can make something like...
pawn Code:
OnPlayerKeyStateChange(playerid, oldkeys, newkeys)
{
 new string[256];
 format(string, sizeof(string), "oldkeys: %d, newkeys: %d", oldkeys, newkeys);
 SendClientMessage(playerid, COLOR_SYSTEM, string);
}
D'oh!!! How I haven't thought of this!?
Reply
#6

yeah yeah, lol tested before you posted, lol. 'aight. Anyway we can't do it huh? ;(
I choose MTA then, it lets you use ANY key for ANY purpose...

but i'll come back to sa-mp after I finish the CS mode
Reply
#7

ah, just thought of it. It would be possible to make a plugin to scan the keys and then return the value to the script where I could check if player has pressed it or not and do whatnot, hmm
Reply
#8

Ok, this topics only like...a year old. :P
Reply
#9

yea, just found it that I posted it earlier and thought of a way to solve it!!
Reply
#10

The only defined keys are these ones: https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List

if You really need the keys defined, you could just do something where you type the key.
Reply
#11

no, that doesn't matter... anyway, i beleave it's possible to use a plugin to send information about key pressed to the script and I will try to do something ike that. wish me luck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)