20.04.2012, 17:00
heres a keybind for jump. you may want to combine it with some kind of godmode as it kills you sometimes when you land.
pawn Код:
new
Float:pX,
Float:pY,
Float:pZ,
IsJumping[MAX_PLAYERS];
forward IsJmping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_JUMP && !IsJumping[playerid])
{
IsJumping[playerid]=1;
GetPlayerVelocity(playerid,pX,pY,pZ);
SetPlayerVelocity(playerid,pX,pY,pZ+0.4);
SetTimerEx("IsJmping",2500,false,"d",playerid);
}
return 1;
}
public IsJmping(playerid)
{
IsJumping[playerid]=0;
}

