29.07.2012, 23:47
This is command to jump hight, when a player type /jump it will enable and disable when he type it again.
In this cmd Player Velocity is set to be 1.0. I want to make a cmd like /jumpvelocity to set the player velocity to 2.0, 3.0, 4.0 and so on, at the same time it should work when he press jump button(i mean player should jump high when he press "Jump Button" according to the velocity which is set by the cmd /jumpvlocity).
How to make? please anyone help..i will rep
In this cmd Player Velocity is set to be 1.0. I want to make a cmd like /jumpvelocity to set the player velocity to 2.0, 3.0, 4.0 and so on, at the same time it should work when he press jump button(i mean player should jump high when he press "Jump Button" according to the velocity which is set by the cmd /jumpvlocity).
pawn Код:
CMD:jump(playerid,params[]) {
if(HJump[playerid])
{
HJump[playerid] = 0; //will enable boast
SendClientMessage(playerid, green, "You have Disabled High Jump.");
}
else
{
HJump[playerid] = 1; //will enable boast
SendClientMessage(playerid, green, "You have Enabled High Jump.");
}
return 1;
}
pawn Код:
if (newkeys & KEY_JUMP)
{
if(HJump[playerid] == 1) {
SetPlayerVelocity(playerid,0.0,0.0,1.0);
}}