[Help] Disappearing JetPack
#1

Hello , i want that when player get jetpack by /jetpack and pressing "f" the jetpack removed from player body and when he again use /jetpack the same jetpack disappear and get attach to his body.
Reply
#2

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

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(PRESSED(KEY_SECONDARY_ATTACK)) //> KEY_SECONDARY_ATTACK is "Enter" You can change it with key list that i copied link above
  {
   if(/* Your check variable here. (player has jetpack or no) */)
   {
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
   }
  }
return 1;
}
Reply
#3

PHP код:
 if(/* Your check variable here. (player has jetpack or no) */)
   {
    
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
   } 
will this take access fom user to get jetpack by going near it?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)