Need help with SetPlayerSpecialAction
#1

I have made the command /jetpack which spawns a jetpack using SetPlayerSpecialAction.
Now how can I make it so when you exit the jetpack, it despawns it?
Reply
#2

I don't believe this is possible.
Reply
#3

I don't think you can but I'm sure clearing their animations should despawn it?
Reply
#4

Quote:
Originally Posted by itsCody
Посмотреть сообщение
I don't think you can but I'm sure clearing their animations should despawn it?
I've tried. It doesn't.
Reply
#5

PHP код:
new jetpack[MAX_PLAYERS];
CMD:jetpack(playeridparams[]){
    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_USEJETPACK);
    
jetpack[playerid] = 1;
}
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
PRESSED(KEY_SECONDARY_ATTACK) && jetpack[playerid] == 1) {
        
SetPlayerSpecialAction(playerid0);
        
jetpack[playerid] = 0;    
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)