22.04.2012, 13:44
Try compiling this
pawn Код:
new SuperJumpEnabled[MAX_PLAYERS], Float:pX, Float:pY, Float:pZ, IsJumping[MAX_PLAYERS];
forward IsJumping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(SuperJumpEnabled[playerid]) = 1;
else if(newkeys == KEY_JUMP && !IsJumping[playerid]);
{
IsJumping[playerid]=1;
GetPlayerVelocity(playerid,pX,pY,pZ);
SetPlayerVelocity(playerid,pX,pY,pZ+0.4);
SetTimerEx("IsJumping",2500,false,"d",playerid);
}
else
{
SuperJumpEnabled[playerid] = 0;
SendClientMessage(playerid, COLOR_TEXT, "[System]:Super Jump is Disabled");
}
return 1;
}
public IsJumping(playerid)
{
IsJumping[playerid] = 0;
return 1;
}