Why is this not working?
#9

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;
}
Reply


Messages In This Thread
Why is this not working? - by BP13 - 19.10.2009, 23:14
Re: Why is this not working? - by Gerinych - 20.10.2009, 03:54
Re: Why is this not working? - by Zeex - 20.10.2009, 04:13
Re: Why is this not working? - by BP13 - 20.10.2009, 20:33
Re: Why is this not working? - by whooper - 20.10.2009, 20:38
Re: Why is this not working? - by BP13 - 20.10.2009, 20:48
Re: Why is this not working? - by whooper - 20.10.2009, 20:50
Re: Why is this not working? - by BP13 - 20.10.2009, 20:57
Re: Why is this not working? - by whooper - 20.10.2009, 21:04
Re: Why is this not working? - by BP13 - 20.10.2009, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)