ClearAnimations
#1

can i make this function "ClearAnimations(playerid);" can be used with "key" on my keyboard without command?
Reply
#2

try this https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply
#3

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEYS)
    {
        ClearAnimation(playerid);
    }
    return 1;
}
KEYS can be found at here
Reply
#4

Quote:
Originally Posted by xganyx
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEYS)
    {
        ClearAnimation(playerid);
    }
    return 1;
}
KEYS can be found at here
What about this.?

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
  if (
PRESSED(KEY_SECONDARY_ATTACK))
  {
    
ClearAnimations(playerid);
  }
  return 
1;

Reply
#5

pawn Код:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
2 function. Good luck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)