Jetpack
#1

.....
Reply
#2

SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); ?
Reply
#3

Quote:
Originally Posted by B-Matt
Посмотреть сообщение
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); ?
Yes, but I want it once the player presses "enter" while on jetpack
Reply
#4

Hmm as far as i know i think thats not possible as thats not an object nor a pickup that can be removed . There might be some solution ...
Reply
#5

okayy then. Thanks for your comments but might as well use /exitjp instead.
Reply
#6

How about using 'OnPlayerKeyStateChange', check when a player press ENTER and use GetPlayerSpecialAction to see if they use 'SPECIAL_ACTION_USEJETPACK' and then clear the special action?

Here's an example:

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK))
    {
        if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
        {
                SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
                SendClientMessage(playerid, -1, "You're no longer using JETPACK.");
        }
    }
    return 1;
}

LE: Oh, sorry, misread your whole post ... My solution won't work for your problem. I doubt you can 'remove', delete, the jetpack object.
Reply
#7

Well, you can't remove the jetpack by detecting a key, as it is already hard coded into GTA, so it will probably already take effect before OnPlayerKeyStateChange is even called. You can do it by command however, which is basically your only option, or you could try making an alternative key bind, like the crouch key or something? I'm fairly sure by setting the players position it removes the jetpack.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)