About JetPack...
#1

i'm creating /getjetpack. i created

pawn Код:
IsPlayerInJetPack[MAX_PLAYERS];

/* JetPack Command */

if(IsPlayerInJetPack[playerid] == 1) return //message goes here
IsPlayerInJetPack[playerid] = 1;
the problem is i want when player leaves jetpack. IsPlayerInJetPack[playerid] will set to 0 i trying to make it onplayerkey but i'm sure everytime i press leave key (even i didn't leave in jetpack yet) the system will set the IsPlayerInJetPack to 0.
Reply
#2

Could you please paste the full code over here? Im not able to understand the problem as well as any solution for it brother!
Reply
#3

here you go

pawn Код:
/* top of script */

new IsPlayerInJetPack[MAX_PLAYERS];

COMMAND:getjetpack(playerid, params[])
{
    if(GetPlayerScore(playerid) > 100)
    {
        if(IsPlayerInJetPack[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You already have your JetPack!");
        SendClientMessage(playerid, COLOR_GREEN, "Enjoy with your jetpack!");
        IsPlayerInJetPack[playerid] = 1;
        SetPlayerSpecialAction(playerid, 2);
    }
    else return SendClientMessage(playerid, COLOR_RED, "You do not have enough score to ride a JetPack!");
    return 1;
}
Reply
#4

Quote:
Originally Posted by MasterJoker
Посмотреть сообщение
here you go

pawn Код:
/* top of script */

new IsPlayerInJetPack[MAX_PLAYERS];

COMMAND:getjetpack(playerid, params[])
{
    if(GetPlayerScore(playerid) > 100)
    {
        if(IsPlayerInJetPack[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "You already have your JetPack!");
        SendClientMessage(playerid, COLOR_GREEN, "Enjoy with your jetpack!");
        IsPlayerInJetPack[playerid] = 1;
        SetPlayerSpecialAction(playerid, 2);
    }
    else return SendClientMessage(playerid, COLOR_RED, "You do not have enough score to ride a JetPack!");
    return 1;
}
Allright this is all good. It has no problems in my view. This should work fine. But Can you give the Keystate or any code where it Set's IsPlayerInJetPack[playerid] to 0?
Reply
#5

i don't have one thats why i create this to give some suggestion
Reply
#6

You could put - https://sampwiki.blast.hk/wiki/GetPlayerSpecialAction somewhere then set it to 0
Reply
#7

Well one question what is the key for ENTER
Reply
#8

https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Reply
#9

Quote:
Originally Posted by MasterJoker
Посмотреть сообщение
i don't have one thats why i create this to give some suggestion
Thats strange as hell! When the Player leave's the Jetpack it set's IsPlayerInJetpack[playerid] to zero.
Let me check your code in my server , ill tell you what to do. Ill create an alternative if i can!!
Reply
#10

anyone know what is the key for ENTER i tried KEY_RETURN but it gives me error
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)