20.10.2012, 12:51
Hi, how i can create something like this:
If player press N key he gets ClientMessage?
If player press N key he gets ClientMessage?
You can only detect keys that are predefined in san andreas such as key_fire or something. i dont think N is one of them.
You can use it if you tell your players to assign N to the fire key or something..sop if you detect key_fire he wud be pressing N :P |
if(newkeys & KEY_NO) //KEY_NO = N
{
//code here
}
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
then use where you want i suggest OnPlayerKeyStateChange
if (PRESSED(KEY_NO))
{
//do something here
}