23.01.2010, 21:44
Yikes....thanks for telling me.
Here's the full script:
Here's the full script:
Код:
}
return 0;
}
#pragma tabsize 0
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SUBMISSION)
{
if(IsPlayerInAnyVehicle(playerid))
{
{
}
}
}
if(newkeys & KEY_FIRE && IsPlayerInAnyVehicle(playerid))
{
if(!IsNosVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, 0xFF0000AA, "You can't add Nitrous to this vehicle");
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
PlayerPlaySound(playerid, 1133 ,0, 0, 0);
GameTextForPlayer(playerid,"~y~Nitro",4000,1);
}
// Check if the player is in any vehicle and is the driver
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
// Check for the HORN key (Crouch key is the same as the horn key)
if (newkeys & KEY_CROUCH)
{
// Create variables
new Float:vx, Float:vy, Float:vz;
// Get the vehicles velocity
GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
// Check the values are not too high already
if (floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3)
{
// Boost the vehicle speed
SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[playerid], vy * SpeedBoostMultiplier[playerid], vz * SpeedBoostMultiplier[playerid]);
}
// Exit here
return 1;
}
}
return 1;
}

