/Superjump
#8

Quote:
Originally Posted by IamPRO
Посмотреть сообщение
pawn Код:
//at the top will be good under the includes//
new Float:SuperJump[3];
//anywhere outside all the call backs//
CMD:superjump( playerid, params[ ] )
{
    #pragma unused params
    if(PlayerInfo[playerid][SjKey] == 1)
    {
        PlayerInfo[playerid][SjKey] = 0;
        SendClientMessage(playerid, COLOR_RED, "You turned off Super Jump {00FF00}(/Superjump)");
        return 1;
    }
    else
    {
        PlayerInfo[playerid][SjKey] = 1;
        SendClientMessage(playerid, COLOR_RED, "You turned on Super Jump. Press {00FF00}LShift {FF0000}to use it");
        return 1;
    }
    return 1;
}
//onplayerkeystatechange//
    if ( newkeys & KEY_JUMP && PlayerInfo[ playerid ][ SjKey ] == 1 )
    {
        SetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]+5);
        return 1;
    }
//At Onplayerupdate//
         GetPlayerVelocity(playerid, SuperJump[0], SuperJump[1], SuperJump[2]);
Tested! works fine for me.
The SuperJump variable doesn't need to be a global it was fine within the scope of OnPlayerKeyStateChange (Local variable).
Reply


Messages In This Thread
/Superjump - by Flokx - 17.09.2014, 01:15
Re: /Superjump - by Dangjai - 17.09.2014, 01:22
Re: /Superjump - by Flokx - 17.09.2014, 01:23
Re: /Superjump - by Don_Cage - 17.09.2014, 01:47
Re: /Superjump - by Flokx - 17.09.2014, 03:38
Re: /Superjump - by Stinged - 17.09.2014, 03:39
Re: /Superjump - by IamPRO - 17.09.2014, 09:41
Re: /Superjump - by thefatshizms - 17.09.2014, 10:52
Re: /Superjump - by IamPRO - 17.09.2014, 12:59
Re: /Superjump - by thefatshizms - 17.09.2014, 14:46

Forum Jump:


Users browsing this thread: 2 Guest(s)