10.02.2017, 15:40
(
Последний раз редактировалось kloning1; 16.05.2017 в 01:08.
)
hi, I'm just learning and enters KEY STATE
that I wanted to ask, why every player alt + tab / when I change it into a jump, he will jump, though not in the press KEY
that I wanted to ask, why every player alt + tab / when I change it into a jump, he will jump, though not in the press KEY
PHP код:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_WALK))
{
if(pendingjump[playerid] > 0) return SCM(playerid, -1,"you must wait 20 second");
if(icanjump[playerid] == true)
{
new Float:vx, Float:vy, Float:vz, str[254];
GetPlayerVelocity(playerid,vx,vy,vz);
SetPlayerVelocity(playerid,vx,vy*1.0,vz+0.8* 1.2);
SCM(playerid, -1, "ALT Press! you get a jump");
pendingjump[playerid] = 20;
}
}
return 1;
}