Key to commands ??
#1

Press N
For My Weapon command
How Can I Do that ?
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}
Reply
#3

Can You Explain more for me
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
 if(newkeys & KEY_NO) //Normal no response is of key "N".
 {
   //Stuffs here.
 }
 return 1;
}
I suggest you to read the wiki of OnPlayerKeyState first.
Reply
#5

Do you have a weapon command already? i can make you an example giving a weapon if you like?
Reply
#6

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
 if(newkeys & KEY_NO) //No key
 {
   // do something here !
// example:
 SendClientMessage(playerid, -1," noob!!!");//.....
//etc
 }
 return 1;
}
Reply
#7

Thanks All.
DobbysGamertag: I Ready Have A weapon command but thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)