20.10.2009, 21:04
Did you try what the one guy said.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_CROUCH) //apparently, you're supposed to use "&", not "=="
{
new
Float:x,
Float:y,
Float:z;
}
if(newkeys & KEY_FIRE) //same thing
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //you might also want to put this in, it makes it so that the passenger can't use the jump button.
{
GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
new Float:s[3];
GetVehicleVelocity(GetPlayerVehicleID(playerid),s[0],s[1],s[2]);
s[0]=1.5*s[0];
s[1]=1.5*s[1];
s[2]=1.5*s[2];
SetVehicleVelocity(GetPlayerVehicleID(playerid),s[0],s[1],s[2]); // This thing ^ only works if you are pressing alt with no other keys pressed.
}
return 1;
}
return 1;
}