18.11.2011, 00:01
pawn Код:
// topo
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_FIRE))
{
new VehicleID = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return 1;
{
AddVehicleComponent(VehicleID ,1010);
RepairVehicle(VehicleID);
return 1;
}
}
return 1;
}