Jump height
#2

Here's my code, you can change the Z value in SetPlayerVelocity to make it better or worst.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (!IsPlayerInAnyVehicle(playerid))
    {
        if (newkeys & KEY_JUMP)
        {
            new
                Float: fVehX,
                Float: fVehY,
                Float: fVehZ
                ;

            GetPlayerVelocity(playerid, fVehX, fVehY, fVehZ);
            if (fVehZ == 0.0)
            {
                SetPlayerVelocity(playerid, fVehX, fVehY, 0.5);
            }
        }
    }

    return 1;
}
Reply


Messages In This Thread
Jump height - by Kitten - 27.11.2010, 02:28
Respuesta: Jump height - by MrDeath537 - 27.11.2010, 02:37
Re: Jump height - by Kitten - 27.11.2010, 02:44
Respuesta: Re: Jump height - by MrDeath537 - 27.11.2010, 02:49
Re: Jump height - by Kitten - 27.11.2010, 02:54
Re: Jump height - by The_Gangstas - 27.11.2010, 02:57
Re: Jump height - by Kitten - 27.11.2010, 02:58
Re: Jump height - by [L3th4l] - 27.11.2010, 03:12
Re: Jump height - by Kitten - 27.11.2010, 03:17
Re: Jump height - by iFriSki - 27.11.2010, 03:26

Forum Jump:


Users browsing this thread: 5 Guest(s)