31.10.2009, 10:35
I just wanted to make a speed boost for the jump key but ingame when you press the key nothing happens ;S how can i fix this ?
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
new veh = GetPlayerVehicleID(playerid);
if(newkeys & KEY_JUMP)
{
new Float:xf;
new Float:yf;
new Float:zf;
GetVehicleVelocity(veh,xf,yf,zf);
SetVehicleVelocity(veh,xf*1.3,yf*1.3,zf*1.3);
}
return 1;
}
}

