Quote:
Originally Posted by radhakr
I made this speedboost yesterday. It works when you press the mouse button in a vehicle:
pawn Код:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (PRESSED(KEY_FIRE)) { if(!IsPlayerInAnyVehicle(playerid)) return 0; new Float:Velocity[3]; GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]); SetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0]*1.3, Velocity[1]*1.3, Velocity[2]*1.3); } return 1; }
I tried changing the key to KEY_JUMP but it didn't work for me either.. maybe it is something about the fact that you are in a vehicle so you can't jump? I'm not sure.
|
I tried many other keys now and it seems do be that most of the keys are bugged or something (KEY_JUMP = KEY_ANALOG_DOWN....lol?)