29.12.2016, 12:13
Anti-slide bug
PHP код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(GetPVarInt(playerid, "Slide") == 1 && newkeys & KEY_SPRINT && newkeys & KEY_HANDBRAKE)
ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.1, 0, 1, 1, 0, 0);
return 1;
}
public OnPlayerUpdate(playerid)
{
new
Keys, ud, lr;
GetPlayerKeys(playerid, Keys, ud, lr);
if(ud < 0) SetPVarInt(playerid, "Slide", 1);
else SetPVarInt(playerid, "Slide", 0);
return 1;
}