25.04.2012, 13:34
Hey guys i'm trying to make it work but it won't work
it's superjump
here's the code
and you have to activate it first so you can use it.. here's the code to activate
No errors or anything but in game when i enable /jump and press jump key it don't jumps high it's like old jump can anyone help me figure the problem out?
it's superjump
here's the code
pawn Код:
new
SuperJumpEnabled[MAX_PLAYERS],
Float:pX,
Float:pY,
Float:pZ,
IsJumping[MAX_PLAYERS];
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_JUMP && IsJumping[playerid])
{
IsJumping[playerid] = 0;
GetPlayerVelocity(playerid, pX, pY, pZ);
SetPlayerVelocity(playerid, pX, pY, pZ +0.4);
}
return 1;
}
pawn Код:
command(jump, playerid, params[])
{
if(SuperJumpEnabled[playerid] == 0)
{
SuperJumpEnabled[playerid] = 1;
SendClientMessage(playerid, COLOR_USE, "Super Jump is now enabled.");
}
else if(SuperJumpEnabled[playerid] == 1)
{
SuperJumpEnabled[playerid] = 0;
SendClientMessage(playerid, COLOR_USE, "Super Jump is now Disabled");
}
return 1;
}