13.10.2011, 00:58
Well, I have this script, but I want to do it where you DON'T have to let off of W to flip/add nos/repair. Any help would be appreciated!
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerConnected(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newkeys == KEY_SUBMISSION && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:z,
vehicle = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vehicle, z);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleZAngle(vehicle, z+0.1);
SetVehicleHealth(vehicleid,1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
AddVehicleComponent(vehicleid,1010);
}
return 1;
}
}
}