27.11.2010, 02:37
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;
}