02.12.2009, 12:10
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SUBMISSION) /// This will add 10x NOS to the car and repair it if player is in a car.
{
if(adminlevel[playerid] < 1) return 1;
else if(!IsPlayerInAnyVehicle(playerid)) return 1;
else
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
return 1;
}
}
return 1;
}
http://forum.sa-mp.com/index.php?topic=61893.0