13.06.2011, 14:43
Hello, Today I've decided to make some kind of a new Nitrous System by using the OnPlayerKeyStateChange, I've successfully made it, I am so happy, So proud!!
If you want to install it in your GM or as an FS:
ADD THIS TO THE TOP OF YOUR SCRIPT:
AND REPLACE THIS:
THIS WILL WORK LIKE THE POLICE SIRENS, IF YOU CLICK TIGHTLY-HARD ON THE MOUSE BUTTON, NITROUS STARTS, AND IF YOU PRESS/RELEASE YOUR FINGER FROM IT SOFTLY-NICE IT STOPS ..
Tell me what do you think about it, and Enjoy using it :']
If you want to install it in your GM or as an FS:
ADD THIS TO THE TOP OF YOUR SCRIPT:
pawn Code:
#define RELEASED(%0) \
((newkeys & (%0)) == (%0))
#define HOLDING(%3) \
((newkeys & (%3)) == (%3))
AND REPLACE THIS:
pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (HOLDING( KEY_FIRE ))
{
if (IsPlayerInAnyVehicle(playerid))
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
else if (RELEASED(KEY_FIRE))
{
RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
//RemoveVehicleComponent(playerid, 1010);
}
}
return 1;
}
Tell me what do you think about it, and Enjoy using it :']