20.12.2015, 18:11
(
Последний раз редактировалось D1am0nd; 20.12.2015 в 19:11.
)
Hello, I am currently trying to change the jump feature of one class.
Basically, I have a timer of 6 seconds, like when you press a key for a high jump and to use it again, must wait 6 seconds. But I want to be able to use jump like three times and then there would be a timer of 6 seconds to do a high jump.
Here is the code:
Basically, I have a timer of 6 seconds, like when you press a key for a high jump and to use it again, must wait 6 seconds. But I want to be able to use jump like three times and then there would be a timer of 6 seconds to do a high jump.
Here is the code:
PHP код:
if(PRESSED(KEY_JUMP))
{
if(team[playerid] == TEAM_TEST)
{
if(pInfo[playerid][pTESTClass] == TEST)
{
if(gettime() - 6 < Abilitys[playerid][HighJump]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
{
new Float:x,Float:y,Float:z;
GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
SetPlayerVelocity(playerid,Float:x*3.0,Float:y*3.0,Float:z+1.0* 1.0);
Abilitys[playerid][HighJump] = gettime();
}
}
}
}